public List<CollectionItem> getUserCollection(CollectionSettings settings, string username)
        {
            string requestUrl = builder.buildUserCollectionUrl(settings, username);

            XDocument result = XDocument.Load(requestUrl);

            return parser.parseCollectionXML(result);
        }
        public void userCollectionURL_WishList_ReturnsUrl()
        {
            // Arrange
            IUrlBuilder testBuilder = new UrlBuilder();
            CollectionSettings set = new CollectionSettings()
            {
                collectionFilter = userCollection.wishlist
            };

            string expected = "http://www.boardgamegeek.com/xmlapi/collection/Rokusho?wishlist=1";

            // Act
            string result = testBuilder.buildUserCollectionUrl(set, "Rokusho");

            // Assert
            Assert.AreEqual(expected, result);
        }
        public void userCollectionURL_MinBGGRating_ReturnsUrl()
        {
            // Arrange
            IUrlBuilder testBuilder = new UrlBuilder();
            CollectionSettings set = new CollectionSettings()
            {
                collectionFilter = userCollection.all,
                minBGGRating = 3
            };

            string expected = "http://www.boardgamegeek.com/xmlapi/collection/Rokusho?minbggrating=3";

            // Act
            string result = testBuilder.buildUserCollectionUrl(set, "Rokusho");

            // Assert
            Assert.AreEqual(expected, result);
        }
        public void userCollectionURL_7Settings_ReturnsUrl()
        {
            // Arrange
            IUrlBuilder testBuilder = new UrlBuilder();
            CollectionSettings set = new CollectionSettings()
            {
                collectionFilter = userCollection.own,
                minPlays = 12,
                maxPlays = 98,
                minBGGRating = 3,
                maxBGGRating = 9,
                minRating = 2,
                maxRating = 10
            };

            string expected = "http://www.boardgamegeek.com/xmlapi/collection/Rokusho?own=1&maxbggrating=9&maxplays=98&maxrating=10&minbggrating=3&minplays=12&minrating=2";

            // Act
            string result = testBuilder.buildUserCollectionUrl(set, "Rokusho");

            // Assert
            Assert.AreEqual(expected, result);
        }
        public void userCollectionURL_2Settings_ReturnsUrl()
        {
            // Arrange
            IUrlBuilder testBuilder = new UrlBuilder();
            CollectionSettings set = new CollectionSettings()
            {
                collectionFilter = userCollection.own,
                minPlays = 12
            };

            string expected = "http://www.boardgamegeek.com/xmlapi/collection/Rokusho?own=1&minplays=12";

            // Act
            string result = testBuilder.buildUserCollectionUrl(set, "Rokusho");

            // Assert
            Assert.AreEqual(expected, result);
        }