Exemple #1
0
        public void WithPostFetchStrategyReturnsObjectItWasCalledOn()
        {
            IPostFetchStrategy <int> expectedStrategy = _mockedPostFetchStrategy;
            var repositoryStrategySet = new RepositoryStrategySet <int>();
            var returnedStrategySet   = repositoryStrategySet.WithPostFetchStrategy(expectedStrategy);

            Assert.AreSame(returnedStrategySet, returnedStrategySet);
        }
Exemple #2
0
        public void WithPostFetchStrategyAddsGivenStrategyToCollection()
        {
            IPostFetchStrategy <int> expectedStrategy = _mockedPostFetchStrategy;
            var repositoryStrategySet = new RepositoryStrategySet <int>();

            repositoryStrategySet.WithPostFetchStrategy(expectedStrategy);

            Assert.AreEqual(expectedStrategy, repositoryStrategySet.PostFetchStrategies.Single(),
                            "Given strategy not added to collection of PostFetchStrategies.");
        }
Exemple #3
0
        public void WithPostFetchStrategyThrowsExceptionWhenNullStrategyGiven()
        {
            var repositoryStrategySet = new RepositoryStrategySet <int>();

            repositoryStrategySet.WithPostFetchStrategy(null);
        }