public void AddLineTest() { TPage target = new TPage(); TLine oLine = new TLine(); target.AddLine(oLine); TiS_Recognition_Common_TPageAccessor pageAccessor = new TiS_Recognition_Common_TPageAccessor(target); Assert.IsTrue(target.Lines.Contains(oLine), "Target must contain added line"); Assert.IsTrue(target.Lines.Count == 1, "number of lines is wrong"); }
public void DeskewTest() { TPage target = new TPage(); TOCRRect oRect = new TOCRRect(0, 0, 100, 100); TiS_Recognition_Common_TPageAccessor pageAccess = new TiS_Recognition_Common_TPageAccessor(target); pageAccess.m_iDeskewY = 100; TOCRRect actual; actual = target.Deskew(oRect); Assert.AreNotEqual(target, actual, "TiS.Recognition.Common.TPage.Deskew did not return the expected value."); }
public void MMtoPixelTest() { TPage target = new TPage(); TiS_Recognition_Common_TPageAccessor pageAccess = new TiS_Recognition_Common_TPageAccessor(target); pageAccess.m_iResolution = 200; int iMMvalue = 1; int expected = 7; int actual; actual = target.MMtoPixel(iMMvalue); Assert.AreEqual(expected, actual, "TiS.Recognition.Common.TPage.MMtoPixel did not return the expected value."); }