Exemplo n.º 1
0
        public async Task AddVehicleModelAsync()
        {
            // Arrange
            _context.VehicleMakes.Add(_testModel1.Make);
            await _context.SaveChangesAsync();

            // Act
            var vehicleModel = await _vehicleService.AddVehicleModelAsync(_testModel1);

            // Assert
            var vehicleModelsInDb = await _context.VehicleModels.ToListAsync();

            Assert.AreEqual(1, vehicleModelsInDb.Count);
            Assert.AreEqual(_testModel1.Name, vehicleModelsInDb[0].Name);
        }