public void TestUpdateVehicle_VehicleNotFoundException()
        {
            Vehicle vehicle = new Vehicle(
                100000,//VehicleId
                1,
                30,
                "AC34793",
                1230.2,
                true
                );

            Assert.Throws <VehicleNotFoundException>(
                () => vehicleDAO.UpdateVehicle(vehicle)
                );
        }
Пример #2
0
        public void Execute()
        {
            DAOFactory  daoFactory = DAOFactory.GetFactory(DAOFactory.Type.Postgres);
            IVehicleDAO vehicleDAO = daoFactory.GetVehicleDAO();

            _updated = vehicleDAO.UpdateVehicle(_vehicle);
        }