Beispiel #1
0
        public void GetMostUsedTag_passFeaturedQuestions_returnMostUsedTag()
        {
            var data = LoadDataFromCode();

            var analyzer = new QuestionsAnalyzer(data);

            var result = analyzer.GetMostUsedTag();

            Assert.AreEqual("swift", result);
        }
Beispiel #2
0
        public void Start()
        {
            var featuredQuestions = Client.GetFeaturedQuestions();

            Debugger.Break();

            var analyzer = new QuestionsAnalyzer(featuredQuestions);

            var mostUsedTag = analyzer.GetMostUsedTag();

            MessageBox.Show("The most used tag is: " + mostUsedTag);

            if (analyzer.HasQuestionsWithTag("c#"))
            {
                var questionList = analyzer.FindQuestionsByTag("c#");

                MessageBox.Show("Selected questions: " + string.Join("\n", questionList.ToArray()));
            }
        }