public void TestCreate() { // Arrange var fakeHelper = A.Fake <IFileHelper>(); List <Contact> exampleList = new List <Contact>() { _rob, _mark }; A.CallTo(() => fakeHelper.GetData <Contact>(A <string> .Ignored)).Returns(exampleList); A.CallTo(() => fakeHelper.SetData <Contact>(A <string> .Ignored, A <List <Contact> > .Ignored)).DoesNothing(); var value = new ValuesController(fakeHelper); // Act value.CreateEmployee(_joe); //Assert A.CallTo(() => fakeHelper.GetData <Contact>(A <string> .Ignored)).MustHaveHappenedOnceExactly(); A.CallTo(() => fakeHelper.SetData <Contact>(A <string> .Ignored, A <List <Contact> > .That.Matches(x => x.Count == 3))).MustHaveHappened(); A.CallTo(() => fakeHelper.SetData <Contact>(A <string> .Ignored, A <List <Contact> > .That.Matches(x => x.Any(f => f.email == "*****@*****.**") == true))).MustHaveHappened(); A.CallTo(() => fakeHelper.SetData <Contact>(A <string> .Ignored, A <List <Contact> > .That.Matches(x => x.Any(f => f.firstName == "Joe") == true))).MustHaveHappened(); A.CallTo(() => fakeHelper.SetData <Contact>(A <string> .Ignored, A <List <Contact> > .That.Matches(x => x.Any(f => f.lastName == "Rue") == true))).MustHaveHappened(); Assert.Pass(); }