GetGameDefinitionDetails() public method

public GetGameDefinitionDetails ( int id, int numberOfPlayedGamesToRetrieve ) : GameDefinitionSummary
id int
numberOfPlayedGamesToRetrieve int
return BusinessLogic.Models.Games.GameDefinitionSummary
        public override void FixtureSetUp()
        {
            base.FixtureSetUp();

            using (dbContext = new NemeStatsDbContext())
            {
                using (dataContext = new NemeStatsDataContext(dbContext, securedEntityValidatorFactory))
                {
                    var playerRepository = new EntityFrameworkPlayerRepository(dataContext);
                    var cacheableGameDataRetriever = new BoardGameGeekGameDefinitionInfoRetriever(new DateUtilities(), new CacheService(), dataContext);

                    var gameDefinitionRetriever = new GameDefinitionRetriever(dataContext, playerRepository, cacheableGameDataRetriever);
                    gameDefinitionSummary = gameDefinitionRetriever.GetGameDefinitionDetails(
                        testGameDefinition.Id, 
                        numberOfGamesToRetrieve);
                }
            }
        }
        public void ItThrowsAnEntityDoesNotExistExceptionIfTheIdIsntValid()
        {
            using (dbContext = new NemeStatsDbContext())
            {
                using (dataContext = new NemeStatsDataContext(dbContext, securedEntityValidatorFactory))
                {
                    var playerRepository = new EntityFrameworkPlayerRepository(dataContext);

                    int invalidId = -1;
                    var expectedException = new EntityDoesNotExistException(typeof(GameDefinition), invalidId);
                    var cacheableGameDataRetriever = new BoardGameGeekGameDefinitionInfoRetriever(new DateUtilities(), new CacheService(), dataContext);

                    var gameDefinitionRetriever = new GameDefinitionRetriever(dataContext, playerRepository, cacheableGameDataRetriever);

                    var actualException = Assert.Throws<EntityDoesNotExistException>(() => 
                        gameDefinitionRetriever.GetGameDefinitionDetails(invalidId, 0));

                    actualException.Message.ShouldBe(expectedException.Message);
                }
            }
        }