public void CreateClient() { //Arrange Client newClient = tu.CreateClientObject(); var expectedResponse = newClient; using (_db = tu.CreateDataBaseContext()) { //Act Client response = cs.CreateClient(_db, newClient); _db.SaveChanges(); //Assert var result = _db.Clients.Find(newClient.Id); Assert.IsNotNull(response); Assert.IsNotNull(result); Assert.AreSame(result, expectedResponse); } }