Package com.github.jknack.antlr4ide.lang

Examples of com.github.jknack.antlr4ide.lang.ElementOption


  public void checkQualifiedTokenElementOptions() throws Exception {
    EList<ElementOption> optionList = new BasicEList<ElementOption>();

    EObject container = createMock(Terminal.class);
    ElementOptions options = createMock(ElementOptions.class);
    ElementOption option = createMock(ElementOption.class);
    EClass eClass = createMock(EClass.class);
    EStructuralFeature feature = createMock(EStructuralFeature.class);
    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    expect(options.eContainer()).andReturn(container);
    expect(options.getOptions()).andReturn(optionList);

    expect(option.getQualifiedId()).andReturn(null);
    expect(option.getId()).andReturn("some");
    optionList.add(option);

    expect(option.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("id")).andReturn(feature);

    PowerMock.expectPrivate(validator, "warning", "unknown option: some", option, feature);

    Object[] mocks = {options, option, container, feature, eClass };
View Full Code Here


    EList<String> names = new BasicEList<String>();
    names.add("some");

    EObject container = createMock(Terminal.class);
    ElementOptions options = createMock(ElementOptions.class);
    ElementOption option = createMock(ElementOption.class);
    QualifiedId qualifiedId = createMock(QualifiedId.class);
    EClass eClass = createMock(EClass.class);
    EStructuralFeature feature = createMock(EStructuralFeature.class);
    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    expect(options.eContainer()).andReturn(container);
    expect(options.getOptions()).andReturn(optionList);

    expect(option.getQualifiedId()).andReturn(qualifiedId);
    expect(qualifiedId.getName()).andReturn(names);
    optionList.add(option);

    expect(option.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("qualifiedId")).andReturn(feature);

    PowerMock.expectPrivate(validator, "warning", "unknown option: some", option, feature);

    Object[] mocks = {options, option, container, feature, eClass, qualifiedId };
View Full Code Here

  public void checkQualifiedWilcardElementOptions() throws Exception {
    EList<ElementOption> optionList = new BasicEList<ElementOption>();

    EObject container = createMock(Wildcard.class);
    ElementOptions options = createMock(ElementOptions.class);
    ElementOption option = createMock(ElementOption.class);
    EClass eClass = createMock(EClass.class);
    EStructuralFeature feature = createMock(EStructuralFeature.class);
    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    expect(options.eContainer()).andReturn(container);
    expect(options.getOptions()).andReturn(optionList);

    expect(option.getQualifiedId()).andReturn(null);
    expect(option.getId()).andReturn("some");
    optionList.add(option);

    expect(option.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("id")).andReturn(feature);

    PowerMock.expectPrivate(validator, "warning", "unknown option: some", option, feature);

    Object[] mocks = {options, option, container, feature, eClass };
View Full Code Here

    EList<String> names = new BasicEList<String>();
    names.add("some");

    EObject container = createMock(Wildcard.class);
    ElementOptions options = createMock(ElementOptions.class);
    ElementOption option = createMock(ElementOption.class);
    QualifiedId qualifiedId = createMock(QualifiedId.class);
    EClass eClass = createMock(EClass.class);
    EStructuralFeature feature = createMock(EStructuralFeature.class);
    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    expect(options.eContainer()).andReturn(container);
    expect(options.getOptions()).andReturn(optionList);

    expect(option.getQualifiedId()).andReturn(qualifiedId);
    expect(qualifiedId.getName()).andReturn(names);
    optionList.add(option);

    expect(option.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("qualifiedId")).andReturn(feature);

    PowerMock.expectPrivate(validator, "warning", "unknown option: some", option, feature);

    Object[] mocks = {options, option, container, feature, eClass, qualifiedId };
View Full Code Here

  public void checkQualifiedRuleReferenceElementOptions() throws Exception {
    EList<ElementOption> optionList = new BasicEList<ElementOption>();

    EObject container = createMock(RuleRef.class);
    ElementOptions options = createMock(ElementOptions.class);
    ElementOption option = createMock(ElementOption.class);
    EClass eClass = createMock(EClass.class);
    EStructuralFeature feature = createMock(EStructuralFeature.class);
    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    expect(options.eContainer()).andReturn(container);
    expect(options.getOptions()).andReturn(optionList);

    expect(option.getQualifiedId()).andReturn(null);
    expect(option.getId()).andReturn("some");
    optionList.add(option);

    expect(option.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("id")).andReturn(feature);

    PowerMock.expectPrivate(validator, "warning", "unknown option: some", option, feature);

    Object[] mocks = {options, option, container, feature, eClass };
View Full Code Here

    EList<String> names = new BasicEList<String>();
    names.add("some");

    EObject container = createMock(RuleRef.class);
    ElementOptions options = createMock(ElementOptions.class);
    ElementOption option = createMock(ElementOption.class);
    QualifiedId qualifiedId = createMock(QualifiedId.class);
    EClass eClass = createMock(EClass.class);
    EStructuralFeature feature = createMock(EStructuralFeature.class);
    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    expect(options.eContainer()).andReturn(container);
    expect(options.getOptions()).andReturn(optionList);

    expect(option.getQualifiedId()).andReturn(qualifiedId);
    expect(qualifiedId.getName()).andReturn(names);
    optionList.add(option);

    expect(option.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("qualifiedId")).andReturn(feature);

    PowerMock.expectPrivate(validator, "warning", "unknown option: some", option, feature);

    Object[] mocks = {options, option, container, feature, eClass, qualifiedId };
View Full Code Here

  public void checkQualifiedActionElementElementOptions() throws Exception {
    EList<ElementOption> optionList = new BasicEList<ElementOption>();

    EObject container = createMock(ActionElement.class);
    ElementOptions options = createMock(ElementOptions.class);
    ElementOption option = createMock(ElementOption.class);
    EClass eClass = createMock(EClass.class);
    EStructuralFeature feature = createMock(EStructuralFeature.class);
    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    expect(options.eContainer()).andReturn(container);
    expect(options.getOptions()).andReturn(optionList);

    expect(option.getQualifiedId()).andReturn(null);
    expect(option.getId()).andReturn("some");
    optionList.add(option);

    expect(option.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("id")).andReturn(feature);

    PowerMock.expectPrivate(validator, "warning", "unknown option: some", option, feature);

    Object[] mocks = {options, option, container, feature, eClass };
View Full Code Here

    EList<String> names = new BasicEList<String>();
    names.add("some");

    EObject container = createMock(ActionElement.class);
    ElementOptions options = createMock(ElementOptions.class);
    ElementOption option = createMock(ElementOption.class);
    QualifiedId qualifiedId = createMock(QualifiedId.class);
    EClass eClass = createMock(EClass.class);
    EStructuralFeature feature = createMock(EStructuralFeature.class);
    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    expect(options.eContainer()).andReturn(container);
    expect(options.getOptions()).andReturn(optionList);

    expect(option.getQualifiedId()).andReturn(qualifiedId);
    expect(qualifiedId.getName()).andReturn(names);
    optionList.add(option);

    expect(option.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("qualifiedId")).andReturn(feature);

    PowerMock.expectPrivate(validator, "warning", "unknown option: some", option, feature);

    Object[] mocks = {options, option, container, feature, eClass, qualifiedId };
View Full Code Here

TOP

Related Classes of com.github.jknack.antlr4ide.lang.ElementOption

Copyright © 2018 www.massapicom. 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.