More Unit Tests

This commit is contained in:
2019-09-09 22:16:51 -06:00
parent 52a566eaf4
commit d99bce4d14
12 changed files with 296 additions and 6 deletions

View File

@@ -0,0 +1,28 @@
using System;
using System.Linq.Expressions;
using Moq;
using NUnit.Framework;
using Tello_Drone;
namespace Tests
{
public class ConsoleLoggerTests
{
[SetUp]
public void Setup()
{
}
[Test]
public void LogTest()
{
var correctMessageSent = false;
var console = new ConsoleLogger();
var test = "Test";
console.LogReceived += delegate(string s) { correctMessageSent |= s == test; };
console.Log(test);
Assert.AreEqual(correctMessageSent, true);
}
}
}