Exemplo n.º 1
0
        public void ListBlogUsers_VerifyBlogUserRepository()
        {
            var mockBlogUserRepo = new MockIBlogUserRepository();
            var interactor       = new ListBlogUsersInteractor(mockBlogUserRepo);
            var stub_BlogUser    = new BlogUserFactory().Create();
            var stub_listOfUsers = new List <BlogUser> {
                stub_BlogUser
            };

            mockBlogUserRepo.StubList(stub_listOfUsers);
            var expected      = MakeResponse(stub_listOfUsers, true);
            var param_request = MakeRequest(stub_BlogUser);

            var response = interactor.ListBlogUsers(param_request);

            mockBlogUserRepo.VerifyList();
        }
Exemplo n.º 2
0
        public void ListBlogUsers_ReturnsExpectedResponse()
        {
            var stubBlogUserRepo = new StubIBlogUserRepository();
            var interactor       = new ListBlogUsersInteractor(stubBlogUserRepo);
            var stub_BlogUser    = new BlogUserFactory().Create();
            var stub_listOfUsers = new List <BlogUser> {
                stub_BlogUser
            };

            stubBlogUserRepo.StubList(stub_listOfUsers);
            var expected      = MakeResponse(stub_listOfUsers, true);
            var param_request = MakeRequest(stub_BlogUser);

            var actual = interactor.ListBlogUsers(param_request);

            Assert.Equal(expected.RequestSuccessful, actual.RequestSuccessful);
            Assert.Equal(expected.ListOfUsers, actual.ListOfUsers);
        }