Ejemplo n.º 1
0
        public void GetPageNumbersTest2()
        {
            string rightString1         = "СКАН_ВГИП.301431.001СБ.pdf";
            IntervalPageNumbers numbers = ScanFileNameConvention.GetPageNumbersInterval(rightString1);

            Assert.AreEqual(numbers.StartPage, 1);
            Assert.AreEqual(numbers.EndPage, 1);
        }
Ejemplo n.º 2
0
        public void GetPageNumbersTest3()
        {
            string rightString1 = "СКАН_ВГИП.301431.001СБ_Л22h.pdf";

            try
            {
                IntervalPageNumbers numbers = ScanFileNameConvention.GetPageNumbersInterval(rightString1);
                // raises AssertionException
                Assert.Fail();
            }
            catch (InvalidCastException)
            { }
            catch (AssertFailedException) { throw; }
        }
Ejemplo n.º 3
0
        public void GetPageNumbersTest()
        {
            string rightString1         = "СКАН_ВГИП.301431.001СБ_Л2.pdf";
            IntervalPageNumbers numbers = ScanFileNameConvention.GetPageNumbersInterval(rightString1);

            Assert.AreEqual(numbers.StartPage, 2);
            Assert.AreEqual(numbers.EndPage, 2);
            string rightString2          = "СКАН_ВГИП.301431.001СБ_Л5-6.pDf";
            IntervalPageNumbers numbers2 = ScanFileNameConvention.GetPageNumbersInterval(rightString2);

            Assert.AreEqual(numbers2.StartPage, 5);
            Assert.AreEqual(numbers2.EndPage, 6);
            //Assert.Fail();
        }