Beispiel #1
0
        public void CheckValidIndex_ValidIndex_ShouldMarkAsValid()
        {
            var parser = new ParserHelperUtil();
            var valid  = parser.CheckValidIndex(new ParseTO(), "1", 1, 2);

            Assert.IsTrue(valid, "Valid recordset index marked as invalid.");
        }
Beispiel #2
0
        public void CheckValidIndex_GivenNegetiveIndex_ShouldThrow_TooHighError()
        {
            var parser = new ParserHelperUtil();

            try
            {
                parser.CheckValidIndex(new ParseTO(), "-1", 1, 2);
            }
            catch (Exception ex)
            {
                Assert.AreEqual("Recordset index [ -1 ] is not greater than zero", ex.Message);
            }
        }
Beispiel #3
0
        public void CheckValidIndex_GivenNegetiveIndex_ShouldThrow_InvalidCharacterError()
        {
            var parser = new ParserHelperUtil();

            try
            {
                parser.CheckValidIndex(new ParseTO(), "a", 1, 2);
            }
            catch (Exception ex)
            {
                Assert.AreEqual("Recordset index (a) contains invalid character(s)", ex.Message);
            }
        }