Beispiel #1
0
        public void GetCargoByIdTest()
        {
            CargoDAO target = new CargoDAO();

            cargo = CreateCargo();
            target.InsertCargo(cargo);
            Cargo newCargo = target.GetCargoById(cargo.CargoId);

            Assert.IsTrue(newCargo.CargoId == cargo.CargoId && newCargo.Type == cargo.Type &&
                          cargo.Price == cargo.Price);
        }
Beispiel #2
0
        public void UpdateCargoByIdTest()
        {
            CargoDAO target = new CargoDAO();

            cargo = CreateCargo();
            target.InsertCargo(cargo);
            cargo.Price = 500;
            string type = RandomString(6);

            cargo.Type = type;
            target.UpdateCargoById(cargo);
            Cargo newCargo = target.GetCargoById(cargo.CargoId);

            Assert.IsTrue(newCargo.CargoId == cargo.CargoId && newCargo.Type == type &&
                          cargo.Price == 500);
        }