public void Home_Create_Ok() { // arrange var context = GetContext(); IHomeService homeService = new HomeService(context); HomeEntity homeEntity = new HomeEntity() { Name = "test home 1", Description = "test desc 1" }; // act var request = new CreateHomeRequest() { HomeEntity = homeEntity, RequestUserId = userIds[0] }; var actual = homeService.CreateHome(request); var expected = context.Homes.Find(4); string actualInsertUserId = expected.InsertUserId; // assert Assert.Equal(expected.Name, actual.HomeEntity.Name); Assert.Equal(userIds[0], actualInsertUserId); }