public void EditCompany_ShouldEditRecord() { // Arrange var context = this.GetDbContext(); this.PopulateData(context); // Act var service = new CompanyLogic(context, mapper); var newCompany = new CompanyDTO { Id = 5, Name = "Lidivo3 Edited", Description = "Grocery store3", Headquarters = "Sofia3", Employees = new List <EmployeeDTO>() }; service.EditCompany(newCompany); var company = context.Companies.Find(5); // Assert Assert.NotNull(company); Assert.Equal("Lidivo3 Edited", company.Name); }