public void boardgame_DefaultSettings_ReturnsManyGames()
        {
            // Arrange
            IBGGClient client = new BGGXMLClient();

            // Act
            List<BoardGame> result = client.getBoardGame(103885, 98778, 129622);

            // Assert
            Assert.AreEqual(3, result.Count);
        }
        public void boardgame_DefaultSettings_ReturnsSingleGame()
        {
            // Arrange
            IBGGClient client = new BGGXMLClient();

            // Act
            List<BoardGame> result = client.getBoardGame(103885);

            // Assert
            Assert.AreEqual(103885, result[0].ObjectID);
        }
        public void search_WithExact_ReturnsOneGame()
        {
            // Arrange
            IBGGClient client = new BGGXMLClient();

            // Act
            var result = client.searchBoardGame(SearchSettings.exact, "7 Wonders");

            // Assert
            Assert.AreEqual(1, result.Count);
        }
        public void userCollections_NoSettings_CollectionFetchedByDefault()
        {
            // Arrange
            IBGGClient client = new BGGXMLClient();

            // Act
            var result = client.getUserCollection("rokusho");

            // Assert
            Assert.IsTrue(result.Count > 0);
        }
        public void search_WithExact_ReturnsCorrectGame()
        {
            // Arrange
            IBGGClient client = new BGGXMLClient();

            // Act
            var result = client.searchBoardGame(SearchSettings.exact, "7 Wonders");

            // Assert
            Assert.IsTrue(result.Any(x => x.name == "7 Wonders"));
        }
        public void search_WithDefaultSettings_ReturnsManyGamesWithRightNames()
        {
            // Arrange
            IBGGClient client = new BGGXMLClient();

            // Act
            var result = client.searchBoardGame("7 Wonders");

            // Assert
            Assert.IsTrue(1 < result.Count(x => x.name.Contains("7 Wonders")));
        }
        public void search_WithDefaultSettings_ReturnsAGameWithRightNames()
        {
            // Arrange
            IBGGClient client = new BGGXMLClient();

            // Act
            var result = client.searchBoardGame("7 Wonders");

            // Assert
            Assert.IsTrue(result.Any(x => x.name == "7 Wonders"));
        }
        public void geekList_WithCommentsSetting_ListItemsRetreivedWithComments()
        {
            // Arrange
            IBGGClient client = new BGGXMLClient();

            // Act
            var result = client.getGeekList(commentSettings.fetch, 11205);

            // Assert
            Assert.IsTrue(result.items.Any(x => x.comments.Count > 0));
        }
        public void geekList_DefaultSettings_ListIsRetreived()
        {
            // Arrange
            IBGGClient client = new BGGXMLClient();

            // Act
            var result = client.getGeekList(11205);

            // Assert
            Assert.AreEqual(11205, result.id);
        }
        public void boardgame_WithReturnComments_ReturnsComments()
        {
            // Arrange
            IBGGClient client = new BGGXMLClient();
            BoardGameSettings settings = new BoardGameSettings()
            {
                commSets = commentSettings.fetch
            };

            // Act
            List<BoardGame> result = client.getBoardGame(settings, 98778);

            // Assert
            Assert.IsTrue(result[0].comments.Count > 0);
        }
        public void boardgame_WithReturnHistory_HistoricStatsAreReturned()
        {
            // Arrange
            IBGGClient client = new BGGXMLClient();
            BoardGameSettings settings = new BoardGameSettings()
            {
                statSets = statsSettings.histroic,
                historicStatsFrom = new DateTime(2013, 01, 01),
                historicStatsTo = new DateTime(2013, 07, 01)
            };

            // Act
            List<BoardGame> result = client.getBoardGame(settings, 103885);

            // Assert
            Assert.IsTrue(result[0].statistics.Count > 1);
        }
        public void boardgame_WithReturnStats_StatsAreReturned()
        {
            // Arrange
            IBGGClient client = new BGGXMLClient();
            BoardGameSettings settings = new BoardGameSettings()
            {
                statSets = statsSettings.current
            };

            // Act
            List<BoardGame> result = client.getBoardGame(settings, 98778);

            // Assert
            Assert.IsTrue(result[0].statistics.Count > 0);
        }