Check to detect repeated words
Inheritance: 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());
		}
Exemple #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());
            }
        }
		public override void TestSetup()
		{
			base.TestSetup();
			m_dataSource = new TestChecksDataSource();
			m_check = new RepeatedWordsCheck(m_dataSource);
		}
Exemple #4
0
 public override void TestSetup()
 {
     base.TestSetup();
     m_dataSource = new TestChecksDataSource();
     m_check      = new RepeatedWordsCheck(m_dataSource);
 }