Esempio n. 1
0
        public void Test_GetDriverById()
        {
            DriversDB driversInfo = new DriversDB("../../Drivers.txt");

            driversInfo.ReadFromFile();
            Assert.AreEqual(driversInfo.GetDriverById(2).Id, Convert.ToUInt32(2));
        }
Esempio n. 2
0
        public void Test_ReadingFromFile()
        {
            DriversDB driversInfo = new DriversDB("../../Drivers.txt");

            driversInfo.ReadFromFile();
            Assert.AreEqual(driversInfo.AllDrivers.Count, 3);
        }
Esempio n. 3
0
        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);
        }