public void Setup() { carParkService = CarParkServiceFactory.Build(CarParkModelType.SmartModel); string filePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), $"File{Path.DirectorySeparatorChar}file_input.txt"); if (File.Exists(filePath)) { commands = File.ReadAllLines(filePath); } else { Console.WriteLine($"Unable to locate file path: {filePath}"); } filePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), $"File{Path.DirectorySeparatorChar}file_output.txt"); if (File.Exists(filePath)) { source_results = File.ReadAllLines(filePath); } else { Console.WriteLine($"Unable to locate file path: {filePath}"); } }
public void Setup() { carParkService = CarParkServiceFactory.Build(CarParkModelType.SmartModel); string input = "create_parking_lot 6"; carParkService.Execute(input); }
public void Setup() { carParkService = CarParkServiceFactory.Build(CarParkModelType.SmartModel); string input = "create_parking_lot 10"; carParkService.Execute(input); var parkInputs = TestHelper.Generate6ParkCarInputs(); foreach (var parkInput in parkInputs) { carParkService.Execute(parkInput.Key); } }
static void Main(string[] args) { IClientCarParkService carParkService = CarParkServiceFactory.Build(CarParkModelType.SmartModel); int numberOfArguments = args.Length; if (numberOfArguments > 0) { // Execute commands via file ProcessFromFile(carParkService, args[0]); } else { // Execute commands via interactive console ProcessFromConsole(carParkService); } }
public void Setup() { carParkService = CarParkServiceFactory.Build(CarParkModelType.SmartModel); }