Example #1
0
        public void GetAll_ShouldReturnAllElements()
        {
            var vehicleDataRead = new VehicleDataRead(_context);

            var vehicles = vehicleDataRead.GetAll();

            Assert.Equal(_context.Vehicles.Count(),vehicles.Count());
        }
Example #2
0
        public async Task Get_ShouldReturnCorrectRecord(int id, string manufacturer, string model, string color)
        {
            var vehicleDataRead = new VehicleDataRead(_context);

            var vehicle = await vehicleDataRead.GetAsync(id);

            Assert.Equal(id, vehicle.VehicleId);
            Assert.Equal(manufacturer, vehicle.Manufacturer);
            Assert.Equal(model, vehicle.Model);
            Assert.Equal(color, vehicle.Color);
        }