Exemplo n.º 1
0
        public void Search_HasQuery()
        {
            var settings = new ScoreSaberFeedSettings(ScoreSaberFeedName.Search);

            settings.SearchQuery = "test";
            var feed = new ScoreSaberFeed(settings);

            feed.EnsureValidSettings();
            Assert.IsTrue(feed.HasValidSettings);
        }
Exemplo n.º 2
0
        public void Search_EmptyCriteria()
        {
            var settings = new ScoreSaberFeedSettings(ScoreSaberFeedName.Search);

            settings.SearchQuery = "";
            var feed = new ScoreSaberFeed(settings);
            var ex   = Assert.ThrowsException <InvalidFeedSettingsException>(() => feed.EnsureValidSettings());

            Console.WriteLine(ex.Message);
            Assert.IsFalse(feed.HasValidSettings);
        }
Exemplo n.º 3
0
        public void QuerylessFeeds()
        {
            var querylessFeeds = new ScoreSaberFeedName[] { ScoreSaberFeedName.LatestRanked, ScoreSaberFeedName.TopPlayed, ScoreSaberFeedName.TopRanked, ScoreSaberFeedName.Trending };

            foreach (var feedType in querylessFeeds)
            {
                var settings = new ScoreSaberFeedSettings(feedType);
                var feed     = new ScoreSaberFeed(settings);
                feed.EnsureValidSettings();
                Assert.IsTrue(feed.HasValidSettings);
            }
        }