Esempio n. 1
0
        protected void SetUp()
        {
            ContactsEndpoint = MockRepository.GenerateStub <IContactsEndpoint>();

            var contacts = new List <Contact>()
            {
                ContactMaker("Minch Yoda", "Dagobah"),
                ContactMaker("Luke Skywalker", "Tatooine"),
                ContactMaker("Obi Wan Kenobi", "Tatooine"),
                ContactMaker("Darth Vader", "The Death Star"),
            };

            ContactsEndpoint.Stub(a => a.Find()).Return(contacts);
        }
Esempio n. 2
0
        protected void SetUp()
        {
            ContactsEndpoint = MockRepository.GenerateStub<IContactsEndpoint>();

            var contacts = new List<Contact>()
            {
                ContactMaker("Minch Yoda","Dagobah"),
                ContactMaker("Luke Skywalker","Tatooine"),
                ContactMaker("Obi Wan Kenobi","Tatooine"),
                ContactMaker("Darth Vader","The Death Star"),
            };

            ContactsEndpoint.Stub(a => a.FindAsync()).Return(Task.FromResult<IEnumerable<Contact>>(contacts));
        }