public void SetUp()
{
AutoMocker = new RhinoAutoMocker<BoardGameGeekGameDefinitionInfoRetriever>();
_expectedBoardGameGeekGameDefinition = new BoardGameGeekGameDefinition
{
AverageWeight = 100,
MinPlayTime = 1,
MaxPlayTime = 3,
Id = _boardGameGeekGameDefinitionId,
MaxPlayers = 200,
MinPlayers = 201,
Name = "some game name",
Description = "some game description",
Thumbnail = "some thumbnail url",
Image = "some image url",
YearPublished = 2099,
Mechanics = new List<BoardGameGeekGameMechanic>
{
new BoardGameGeekGameMechanic
{
MechanicName = _mechanic1
},
new BoardGameGeekGameMechanic
{
MechanicName = _mechanic2
}
},
Categories = new List<BoardGameGeekGameCategory>
{
new BoardGameGeekGameCategory
{
CategoryName = _category1
},
new BoardGameGeekGameCategory
{
CategoryName = _category2
}
},
GameDefinitions = new List<GameDefinition>
{
new GameDefinition
{
GamingGroupId = 1,
PlayedGames = new List<PlayedGame>
{
new PlayedGame
{
NumberOfPlayers = 2
}
}
},
new GameDefinition
{
GamingGroupId = 2,
PlayedGames = new List<PlayedGame>
{
new PlayedGame
{
NumberOfPlayers = 3
}
}
}
}
};
var queryable = new List<BoardGameGeekGameDefinition>
{
_expectedBoardGameGeekGameDefinition
}.ToList().AsQueryable();
AutoMocker.Get<IDataContext>().Expect(mock => mock.GetQueryable<BoardGameGeekGameDefinition>()).Return(queryable);
}