Check to detect repeated words
Наследование: IScrCheckInventory
		void Test(string[] result, string text, string desiredKey)
		{
			source.Text = text;

			RepeatedWordsCheck check = new RepeatedWordsCheck(source);
			List<TextTokenSubstring> tts =
				check.GetReferences(source.TextTokens(), desiredKey);

			Assert.AreEqual(result.GetUpperBound(0)+1, tts.Count,
				"A different number of results was returned than what was expected." );

			for (int i = 0; i <= result.GetUpperBound(0); ++i)
				Assert.AreEqual(result[i], tts[i].InventoryText, "Result number: " + i.ToString());
		}
Пример #2
0
        void Test(string[] result, string text, string desiredKey)
        {
            source.Text = text;

            RepeatedWordsCheck        check = new RepeatedWordsCheck(source);
            List <TextTokenSubstring> tts   =
                check.GetReferences(source.TextTokens(), desiredKey);

            Assert.AreEqual(result.GetUpperBound(0) + 1, tts.Count,
                            "A different number of results was returned than what was expected.");

            for (int i = 0; i <= result.GetUpperBound(0); ++i)
            {
                Assert.AreEqual(result[i], tts[i].InventoryText, "Result number: " + i.ToString());
            }
        }
Пример #3
0
		public override void TestSetup()
		{
			base.TestSetup();
			m_dataSource = new TestChecksDataSource();
			m_check = new RepeatedWordsCheck(m_dataSource);
		}
Пример #4
0
 public override void TestSetup()
 {
     base.TestSetup();
     m_dataSource = new TestChecksDataSource();
     m_check      = new RepeatedWordsCheck(m_dataSource);
 }