public void Test_GetDriverById() { DriversDB driversInfo = new DriversDB("../../Drivers.txt"); driversInfo.ReadFromFile(); Assert.AreEqual(driversInfo.GetDriverById(2).Id, Convert.ToUInt32(2)); }
public void Test_ReadingFromFile() { DriversDB driversInfo = new DriversDB("../../Drivers.txt"); driversInfo.ReadFromFile(); Assert.AreEqual(driversInfo.AllDrivers.Count, 3); }
public MainWindow() { InitializeComponent(); counter = 0; clientsInfo = new ClientsDB("../../InputData/ClientsData.txt"); clientsInfo.ReadFromFile(); driversInfo = new DriversDB("../../InputData/DriversData.txt"); driversInfo.ReadFromFile(); }
public void Test_AllOrdersProperty() { ClientsDB clientsInfo = new ClientsDB("../../Clients.txt"); clientsInfo.ReadFromFile(); DriversDB driversInfo = new DriversDB("../../Drivers.txt"); driversInfo.ReadFromFile(); OrdersDB ordersInfo = new OrdersDB("../../Orders.txt", clientsInfo, driversInfo); List <TaxiOrder> lst = ordersInfo.AllOrders; }
public void Test_ReadingFromFile() { ClientsDB clientsInfo = new ClientsDB("../../Clients.txt"); clientsInfo.ReadFromFile(); DriversDB driversInfo = new DriversDB("../../Drivers.txt"); driversInfo.ReadFromFile(); OrdersDB ordersInfo = new OrdersDB("../../Orders.txt", clientsInfo, driversInfo); ordersInfo.ReadFromFile(); Assert.AreEqual(ordersInfo.AllOrders.Count, 8); }