public void WithPostPersistenceStrategyReturnsObjectItWasCalledOn() { IPostPersistenceStrategy <int> expectedStrategy = _mockedPostPersistenceStrategy; var repositoryStrategySet = new RepositoryStrategySet <int>(); var returnedStrategySet = repositoryStrategySet.WithPostPersistenceStrategy(expectedStrategy); Assert.AreSame(returnedStrategySet, returnedStrategySet); }
public void WithPostPersistenceStrategyAddsGivenStrategyToCollection() { IPostPersistenceStrategy <int> expectedStrategy = _mockedPostPersistenceStrategy; var repositoryStrategySet = new RepositoryStrategySet <int>(); repositoryStrategySet.WithPostPersistenceStrategy(expectedStrategy); Assert.AreEqual(expectedStrategy, repositoryStrategySet.PostPersistenceStrategies.Single(), "Given strategy not added to collection of PostPersistenceStrategies."); }
public void WithPostPersistenceStrategyThrowsExceptionWhenNullStrategyGiven() { var repositoryStrategySet = new RepositoryStrategySet <int>(); repositoryStrategySet.WithPostPersistenceStrategy(null); }