Exemplo n.º 1
0
        public void RepeatResets()
        {
            var grammar = TestGrammar.Create();
            var parser  = new PegParser <TestData>(grammar, grammar.Root());
            var input   = "AAABBBBB";
            var result  = parser.Parse(input);

            Assert.AreEqual(input, result.Items);
        }
Exemplo n.º 2
0
        public void CaptureInitializedProperly()
        {
            var grammar = TestGrammar.Create();
            var parser  = new PegParser <TestData>(grammar, grammar.Root());
            var input   = "AAABBBBB";
            var result  = parser.Parse(input);

            Assert.AreEqual(input, result.Items);
        }
Exemplo n.º 3
0
        public void Initialize()
        {
            var grammarServiceMock = new Mock <IGrammarService>(MockBehavior.Loose);

            _grammar = new TestGrammar(grammarServiceMock.Object);
            _grammar.Initialize();

            rule1Result = 0;
            rule2Result = 0;
            rule3Result = 0;
        }
Exemplo n.º 4
0
 public void SetUp()
 {
     _grammar = new TestGrammar();
 }
        public void ATest()
        {
            var grammar = new TestGrammar();

            Assert.False(grammar.CaseSensitive);
        }
Exemplo n.º 6
0
 public void ATest()
 {
     var grammar = new TestGrammar();
     Assert.False(grammar.CaseSensitive);
 }