public async Task Should_updated_parkingLot_successfully() { //given var parkingLot = GenerateParkingLotDtoInstance(); var dbContext = GetContext(); var parkingLotService = new ParkingLotService(dbContext); var name = await parkingLotService.AddParkingLotAsync(parkingLot); //when var updatedCapacity = new CapacityDto() { Capacity = 2 }; var acatualParkingLots = await parkingLotService.UpdateCapacityAsync(name, updatedCapacity); //then Assert.Equal(updatedCapacity.Capacity.Value, acatualParkingLots.Capacity.Value); var actualParkingLot = await dbContext.ParkingLots.FirstOrDefaultAsync(lot => lot.Name == name); Assert.Equal(updatedCapacity.Capacity.Value, actualParkingLot.Capacity); }