Examples of Antlr4Validator


Examples of com.github.jknack.antlr4ide.validation.Antlr4Validator

    LexerCommand command = createMock(LexerCommand.class);
    expect(command.getArgs()).andReturn(args);
    expect(command.eContainer()).andReturn(rule);

    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    PowerMock.expectPrivate(validator, "warning",
        "rule 'RULE' contains a lexer command with an unrecognized " +
            "constant value; lexer interpreters may produce incorrect output",
        args, feature);

    Object[] mocks = {rule, command, args, ref, eClass, feature, validator };

    replay(mocks);

    validator.commandWithUnrecognizedConstantValue(command);

    verify(mocks);
  }
View Full Code Here

Examples of com.github.jknack.antlr4ide.validation.Antlr4Validator

    PowerMock.mockStatic(NodeModelUtils.class);
    expect(NodeModelUtils.findNodesForFeature(args, LangPackage.Literals.LEXER_COMMAND_EXPR__REF))
        .andReturn(Arrays.asList(node));

    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    Object[] mocks = {rule, command, args, ref, feature, validator, node };
    PowerMock.replay(NodeModelUtils.class);

    replay(mocks);

    validator.commandWithUnrecognizedConstantValue(command);

    verify(mocks);
    PowerMock.verify(NodeModelUtils.class);
  }
View Full Code Here

Examples of com.github.jknack.antlr4ide.validation.Antlr4Validator

    PowerMock.mockStatic(NodeModelUtils.class);
    expect(NodeModelUtils.findNodesForFeature(args, LangPackage.Literals.LEXER_COMMAND_EXPR__REF))
        .andReturn(Arrays.asList(node));

    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    PowerMock.expectPrivate(validator, "warning",
        "rule 'RULE' contains a lexer command with an unrecognized " +
            "constant value; lexer interpreters may produce incorrect output",
        args, feature);

    Object[] mocks = {rule, command, args, ref, eClass, feature, validator, node };
    PowerMock.replay(NodeModelUtils.class);

    replay(mocks);

    validator.commandWithUnrecognizedConstantValue(command);

    verify(mocks);
    PowerMock.verify(NodeModelUtils.class);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.