public void SetUp() { var people = new List <Person>() { new Person { FirstName = "John", LastName = "Smith", Rating = 7, StartDate = new DateTime(2000, 10, 1) }, new Person { FirstName = "Mary", LastName = "Thomas", Rating = 9, StartDate = new DateTime(1971, 7, 23) } }; var mockRepository = new Mock <IPersonRepository>(); mockRepository.Setup(r => r.GetPeople()).Returns(people); SimpleContainer.MapInstance <IPersonRepository>(mockRepository.Object); }
public void Setup() { var people = new List <Person>() { new Person() { FirstName = "John", LastName = "Smith", Rating = 7, StartDate = DateTime.Parse("10/01/2000") }, new Person() { FirstName = "Mary", LastName = "Thomas", Rating = 9, StartDate = DateTime.Parse("07/23/1971") }, }; var mockRepository = new Mock <IPersonRepository>(); mockRepository.Setup(r => r.GetPeople()).Returns(people); SimpleContainer.MapInstance <IPersonRepository>(mockRepository.Object); }
public void Setup() { FakeRepository repository = new FakeRepository(); SimpleContainer.MapInstance <IPersonRepository>(new FakeRepository()); }