public void WhenAutoExists_UpdateAuto_ItShouldUpdateSuccessfully() { Entities applicationContext = CreateTestEntities(); AutoRepository testAutoRepository = new AutoRepository(applicationContext); int testAutoId = 2; Automobil testAuto = applicationContext.Automobils.FirstOrDefault(a => a.AutoId == testAutoId); testAuto.NumarAuto = "Upd"; testAutoRepository.UpdateAuto(testAuto); applicationContext.Automobils.FirstOrDefault(a => a.AutoId == testAutoId)?.NumarAuto.Should().Be("Upd"); }