private void GuardCloseTag()
 {
     if ((_closeTag == null) == _expectCloseTag)
     {
         if (_closeTag != null)
         {
             throw ParseException.UnexpectedCloseTag(_closeTag.GetType().Name).Decorate(_parser.Current);
         }
         throw ParseException.ExpectedCloseTag().Decorate(_parser.Previous);
     }
 }
Esempio n. 2
0
 public void TestParsePartialOpenWithPartialNested()
 {
     try
     {
         Base().Parse("<c:out value=\"12\">something");
         Assert.Fail("Expected exception");
     }
     catch (ParseException Pe)
     {
         Assert.That(Pe.MessageWithOutContext, Is.EqualTo(ParseException.ExpectedCloseTag().Message));
     }
 }
Esempio n. 3
0
 public void TestParsePartialOpen()
 {
     try
     {
         Base().Parse("<c:out value=\"${Model.Text}\">");
         Assert.Fail("Expected exception");
     }
     catch (ParseException Pe)
     {
         Assert.That(Pe.MessageWithOutContext, Is.EqualTo(ParseException.ExpectedCloseTag().Message));
     }
 }