public async Task Update_ValidInput_ReturnsCorrectData(int id, string birthDate, string birthPlace, string description, string firstName, string lastName) { #region Arrange var dbContext = new ApplicationDbContext(_dbContextOptions); await dbContext.Database.EnsureDeletedAsync(); var person = new Domain.Person { BirthDate = "04-10-2010", BirthPlace = "Birth Place", Description = "Description", FirstName = "Firt Name", LastName = "Last Name" }; dbContext.Persons.Add(person); await dbContext.SaveChangesAsync(); var newPerson = new AdminPersonModel { ID = id, BirthDate = DateTime.Parse(birthDate), BirthPlace = birthPlace, Description = description, FirstName = firstName, LastName = lastName }; var expectedPerson = new PersonModel { ID = id, BirthDate = DateTime.Parse(birthDate), BirthPlace = birthPlace, Description = description, FirstName = firstName, LastName = lastName }; var appPerson = new Person(dbContext); #endregion #region Act var actualPerson = await appPerson.Update(newPerson); #endregion #region Assert Assert.Equal(expectedPerson.ID, actualPerson.ID); Assert.Equal(expectedPerson.BirthDate, actualPerson.BirthDate); Assert.Equal(expectedPerson.BirthPlace, actualPerson.BirthPlace); Assert.Equal(expectedPerson.Description, actualPerson.Description); Assert.Equal(expectedPerson.FirstName, actualPerson.FirstName); Assert.Equal(expectedPerson.LastName, actualPerson.LastName); #endregion }