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

@@ -6,10 +6,9 @@ namespace Tello_Drone
{
private readonly IUdpClientWrapper _udpClient;
public DroneComands(IConsoleLogger consoleLogger)
public DroneComands(IUdpClientWrapperFactory udpClientWrapperFactory)
{
var udpClient = new UdpClientWrapper(consoleLogger);
_udpClient = udpClient;
_udpClient = udpClientWrapperFactory.Create();
}
public void Forward(int x) =>SendCommand($"forward {x}");
@@ -34,9 +33,9 @@ namespace Tello_Drone
private bool SendCommand(string message)
private void SendCommand(string message)
{
return _udpClient.TrySend(message, 5_000, 3);
_udpClient.TrySend(message, 5_000, 3);
}
private bool TrySendCommand(string message)