public void List_VerifySqlServerDataAccess()
        {
            var fakeConfig = MakeFakeConfig();
            var stubSqlParameterBuilder = new StubISqlParameterBuilder();
            var mockSqlServerDataAccess = new MockISqlServerDataAccess();
            var sqlServerAdapter        = new BlogPostSqlServerAdapter(fakeConfig,
                                                                       mockSqlServerDataAccess, stubSqlParameterBuilder);
            var stub_listOfBlogPost = new List <BlogPost> {
                new BlogPostFactory().Create()
            };

            mockSqlServerDataAccess.StubExecuteReaderStoredProcedure(stub_listOfBlogPost);

            sqlServerAdapter.List();

            mockSqlServerDataAccess.VerifyExecuteReaderStoredProcedureCalled <BlogPost>(1);
        }
        public void List_ReturnsExpectedList()
        {
            var fakeConfig = MakeFakeConfig();
            var stubSqlParameterBuilder = new StubISqlParameterBuilder();
            var stubSqlServerDataAccess = new StubISqlServerDataAccess();
            var sqlServerAdapter        = new BlogPostSqlServerAdapter(fakeConfig,
                                                                       stubSqlServerDataAccess, stubSqlParameterBuilder);
            var expected = new List <BlogPost> {
                new BlogPostFactory().Create()
            };

            stubSqlServerDataAccess.StubExecuteReaderStoredProcedure(expected);

            var actual = sqlServerAdapter.List();

            Assert.Equal(expected, actual);
        }