Examples of validateDefinition()


Examples of org.auraframework.def.ComponentDef.validateDefinition()

        XMLParser parser = XMLParser.getInstance();
        descriptor = DefDescriptorImpl.getInstance("test:parserFragment", ComponentDef.class);
        Source<?> source = getSource(descriptor);
        ComponentDef cd = parser.parse(descriptor, source);
        try {
            cd.validateDefinition();
            fail("Parsing invalid source should throw exception");
        } catch (AuraException e) {
            Location location = e.getLocation();
            assertTrue("Wrong filename.", location.getFileName().endsWith("parserFragment.cmp"));
            checkExceptionContains(e, InvalidDefinitionException.class,
View Full Code Here

Examples of org.auraframework.def.ComponentDef.validateDefinition()

        DefDescriptor<ComponentDef> desc = DefDescriptorImpl.getInstance("test:fakeComponent", ComponentDef.class);
        builder.extendsDescriptor = desc;
        ComponentDef cmp = builder.build();

        try {
            cmp.validateDefinition();
        } catch (AuraRuntimeException e) {
            fail("Should not have thrown AuraRuntimeException on abstract component extending component.");
        }
    }
View Full Code Here

Examples of org.auraframework.def.ComponentDef.validateDefinition()

        DefDescriptor<ComponentDef> desc = DefDescriptorImpl.getInstance("test:fakeAbstractParent", ComponentDef.class);
        builder.extendsDescriptor = desc;
        ComponentDef cmp = builder.build();

        try {
            cmp.validateDefinition();
        } catch (AuraRuntimeException e) {
            fail("Should not have thrown AuraRuntimeException on abstract component extending abstract component.");
        }
    }
View Full Code Here

Examples of org.auraframework.def.ComponentDefRef.validateDefinition()

    }

    public void testValidateDefinition() throws Exception {
        ComponentDefRef cdr = vendor.makeComponentDefRefWithNulls(null, null, null);
        try {
            cdr.validateDefinition();
            fail("Should have thrown InvalidDefinitionException because descriptor is null.");
        } catch (InvalidDefinitionException e) {

        }
    }
View Full Code Here

Examples of org.auraframework.def.ControllerDef.validateDefinition()

        DefDescriptor<ControllerDef> descriptor = DefDescriptorImpl.getInstance("js://test.testInvalidJSController",
                ControllerDef.class);
        Source<?> source = getJavascriptSourceLoader().getSource(descriptor);
        ControllerDef cd = parser.parse(descriptor, source);
        try {
            cd.validateDefinition();
            fail("Javascript controller must only contain functions");
        } catch (Exception e) {
            this.checkExceptionContains(e, InvalidDefinitionException.class, "Expected ':'");
        }
    }
View Full Code Here

Examples of org.auraframework.def.ControllerDef.validateDefinition()

                .getInstance("js://test.testNonFunctionElementsInJSController",
                        ControllerDef.class);
        Source<?> source = getJavascriptSourceLoader().getSource(descriptor);
        ControllerDef cd = parser.parse(descriptor, source);
        try {
            cd.validateDefinition();
            fail("Javascript controller must only contain functions");
        } catch (Exception e) {
          this.checkExceptionContains(e, InvalidDefinitionException.class,
                            "JsonStreamParseException");
        }
View Full Code Here

Examples of org.auraframework.def.Definition.validateDefinition()

  protected void runTestCase() throws Exception{
    try{                                 
      DefDescriptor<? extends Definition> descriptor = getAuraTestingUtil().addSourceAutoCleanup(getDefClass(), getResourceSource(), getDefDescriptorName(), (testNamespace == TestNamespace.System? true: false));
      Source<? extends Definition> source = StringSourceLoader.getInstance().getSource(descriptor);     
      Definition def = parser.parse(descriptor, source);
      def.validateDefinition();     
     
      if(!isValidTestCase()) {
        fail("Should have thrown Exception for access: " + getAccess());
      }
    }
View Full Code Here

Examples of org.auraframework.def.Definition.validateDefinition()

        (testConsumerNamespace == TestNamespace.System || testConsumerNamespace == TestNamespace.SystemOther ? true : false));

    Source<? extends Definition> source = StringSourceLoader.getInstance().getSource(descriptorConsumer);
    try {
      Definition def = parser.parse(descriptorConsumer, source);
      def.validateDefinition();

      descriptorConsumer.getDef();

      if (!isValidTestCase()) {
        fail("Should have thrown Exception when " + testResourceNamespace + "." + testResource + " is " + testCase + " and used in "
View Full Code Here

Examples of org.auraframework.def.Definition.validateDefinition()

        (testResourceNamespace == TestNamespace.System || testResourceNamespace == TestNamespace.SystemOther ? true : false));
   
    Source<? extends Definition> source = StringSourceLoader.getInstance().getSource(descriptor);
    try {
      Definition def = parser.parse(descriptor, source);
      def.validateDefinition();

      descriptor.getDef();
     
    } catch (AuraHandledException e) {
      fail("Should not have thrown Exception when " + testResourceNamespace + "." + testResource);
View Full Code Here

Examples of org.auraframework.def.Definition.validateDefinition()

        (testConsumerNamespace == TestNamespace.System || testConsumerNamespace == TestNamespace.SystemOther ? true : false));

    Source<? extends Definition> source = StringSourceLoader.getInstance().getSource(descriptorConsumer);
    try {
      Definition def = parser.parse(descriptorConsumer, source);
      def.validateDefinition();

      if(attribute.equals("abstract")){
        Aura.getInstanceService().getInstance(descriptorConsumer.getDef());
      }
      else{
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.