public void Post_Creates_New_Scientist() { var newScientist = new Scientist(1, "New scientist"); var scientistList = new List <Scientist>(); scientistRepo.When(t => t.Create(newScientist)) .Do(t => scientistList.Add(newScientist)); scientistRepo.GetAll().Returns(scientistList); var result = underTest.Post(newScientist); Assert.Contains(newScientist, result); }