Return emulator from helper function, remove casts to Emulator

- Use variable name that reflects type
This commit is contained in:
John Lewin 2017-06-02 19:57:15 -07:00
parent ccd83ba673
commit b0957cdd13
5 changed files with 13 additions and 19 deletions

View file

@ -187,7 +187,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
}
}
public static IDisposable LaunchAndConnectToPrinterEmulator(this AutomationRunner testRunner, string make = "Airwolf 3D", string model = "HD", bool runSlow = false)
public static Emulator LaunchAndConnectToPrinterEmulator(this AutomationRunner testRunner, string make = "Airwolf 3D", string model = "HD", bool runSlow = false)
{
// Load the TestEnv config
var config = TestAutomationConfig.Load();
@ -195,7 +195,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
// Create the printer
MatterControlUtilities.AddAndSelectPrinter(testRunner, make, model);
Emulator emulator = new Emulator();
var emulator = new Emulator();
emulator.PortName = config.Printer;
emulator.RunSlow = runSlow;