示例#1
0
        public void IronDogWalker()
        {
            StringDiffMarkup metric  = new StringDiffMarkup();
            string           output3 = metric.GetColorCodedCorrectionLine("iron dog walker", "iron dagger watch");

            CorrectionSegment[] csArry = metric.GetRightWrongParts("iron dog walker", "iron dagger watch");
            Assert.IsTrue(csArry[0].correct);
            Assert.AreEqual("iron d", csArry[0].actualText);

            Assert.IsFalse(csArry[1].correct);
            Assert.AreEqual("a", csArry[1].actualText);
            Assert.AreEqual("o", csArry[1].expectedText);


            Assert.IsTrue(csArry[2].correct);
            Assert.AreEqual("g", csArry[2].actualText);

            Assert.IsFalse(csArry[3].correct);
            Assert.AreEqual("ger", csArry[3].actualText);
            Assert.AreEqual("", csArry[3].expectedText);

            Assert.IsTrue(csArry[4].correct);
            Assert.AreEqual(" wa", csArry[4].actualText);

            Assert.IsFalse(csArry[5].correct);
            Assert.AreEqual("tch", csArry[5].actualText);
            Assert.AreEqual("lker", csArry[5].expectedText);
        }
示例#2
0
 public void TestMethod3()
 {
     StringDiffMarkup metric = new StringDiffMarkup();
     //string output = metric.GetColorCodedCorrectionLine("talk show host", "car show");
     //output += "<br />car show";
     //string output2 = metric.GetColorCodedCorrectionLine("talk show host", "talking snake");
     //output2 += "<br />talking snake";
     string output3 = metric.GetColorCodedCorrectionLine("iron dog walker", "iron dagger watch");
     //CorrectionSegment[] parts = metric.GetRightWrongParts("talk show host", "car show");
 }
示例#3
0
        public void IronDogWalker2()
        {
            string           expected = "We can write up a script to test this feature. . .but for now, here's some text";
            string           actual   = "I'll try typing some stuff here";//"We can't do anything about it.";
            StringDiffMarkup metric   = new StringDiffMarkup();
            string           output3  = metric.GetColorCodedCorrectionLine(expected, actual);
            string           output4  = metric.GetComparativeLines(expected, actual);

            CorrectionSegment[] csArry = metric.GetRightWrongParts(expected, actual);
            //return;
        }