public void SelectedOrderTest() { String OrdersPath = "Orders.txt"; String TaxistsPath = "Taxists.txt"; //Order mock data String Destination = "Shevchenka, 12"; String CarNumber = "BC0173AC"; String Where = "University, 1"; Models.status Status = APPOINTED; int PassengersAmount = 1; Order order = new Order(Where, Destination, PassengersAmount, Status, CarNumber); //Taxist mock data bool isBusy = true; String Model = "Tesla"; String Number = "BC0173AC"; Taxist taxist = new Taxist(Model, Number, isBusy); view = new ViewModels.MainWindowViewModel(OrdersPath, TaxistsPath); view.SelectedOrder = order; view.SelectedTaxi = taxist; Assert.AreEqual(order, view.SelectedOrder); Assert.AreEqual(taxist, view.SelectedTaxi); }
public void UploadExceptionsTest() { String OrdersPath = "Orders.txt"; String TaxistsPath = "Taxists.txt"; String WrongOrderPath = "WrongOrders.txt"; //Order mock data String Destination = "Shevchenka, 12"; String CarNumber = "BC0173AC"; String Where = "University, 1"; Models.status Status = APPOINTED; int PassengersAmount = 1; Order order = new Order(Where, Destination, PassengersAmount, Status, CarNumber); //Taxist mock data bool isBusy = true; String Model = "Tesla"; String Number = "BC0173AC"; Taxist taxist = new Taxist(Model, Number, isBusy); view = new ViewModels.MainWindowViewModel(OrdersPath, TaxistsPath); view.OrdersPath = WrongOrderPath; view.Upload(); }
public void OrderConstructorWithParamsTest() { //arrange String Destination = "Shevchenka, 12"; String CarNumber = "BC0173AC"; String Where = "University, 1"; Models.status Status = APPOINTED; int PassengersAmount = 1; String ExpectedDestination = "Shevchenka, 12"; String ExpectedCarNumber = "BC0173AC"; String ExpectedWhere = "University, 1"; Models.status ExpectedStatus = APPOINTED; int ExpectedPassengersAmount = 1; //act Models.Order obj = new Models.Order(Where, Destination, PassengersAmount, Status, CarNumber); //assert Assert.AreEqual(ExpectedDestination, obj.Destination); Assert.AreEqual(ExpectedCarNumber, obj.CarNumber); Assert.AreEqual(ExpectedWhere, obj.Where); Assert.AreEqual(ExpectedStatus, obj.Status); Assert.AreEqual(ExpectedPassengersAmount, obj.PassengersAmount); }
public void GetStatusTest() { //arrange Models.status Status = APPOINTED; Models.status ExpectedStatus = APPOINTED; //act Models.Order obj = new Models.Order(); obj.Status = Status; //assert Assert.AreEqual(ExpectedStatus, obj.Status); }