Package org.auraframework.def

Examples of org.auraframework.def.Definition


        getDefDescriptorName(testConsumer, false),
        (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


        DefDescriptor<TestSuiteDef> descriptor = DefDescriptorImpl.getInstance(
                "js://test.testJSTestSuite", TestSuiteDef.class);
        Source<?> source = getJavascriptSourceLoader().getSource(descriptor);
        // Step 1: Parse the source which refers to a simple component with a
        // reference to Javascript test suite
        Definition testSuite = parser.parse(descriptor, source);
        assertTrue(testSuite instanceof JavascriptTestSuiteDef);
        // Step 2: Gold file the Json output of the test suite object
        serializeAndGoldFile(testSuite, "_JSTestSuite");
    }
View Full Code Here

    public void testDuplicateJSController() throws Exception {
        DefDescriptor<ControllerDef> descriptor = DefDescriptorImpl
                .getInstance("js://test.testDuplicateJSController",
                        ControllerDef.class);
        Source<?> source = getJavascriptSourceLoader().getSource(descriptor);
        Definition controller = parser.parse(descriptor, source);
        assertTrue(controller instanceof JavascriptControllerDef);
        JavascriptControllerDef obj = (JavascriptControllerDef) controller;
        Map<String, JavascriptActionDef> controllerActions = obj
                .getActionDefs();
        assertTrue(controllerActions.containsKey("functionName"));
View Full Code Here

        DefDescriptor<ControllerDef> descriptor = DefDescriptorImpl
                .getInstance("js://test.testJSController", ControllerDef.class);
        Source<?> source = getJavascriptSourceLoader().getSource(descriptor);
        // STEP 1:
        // Parse and create the ControllerDef object for the component
        Definition controller = parser.parse(descriptor, source);

        // STEP 2:
        // 2.1:Verify the CONTROLLERDEF object
        assertTrue(controller instanceof JavascriptControllerDef);
        // Convert from a generic controller to a Javascript type controller
View Full Code Here

                .getInstance("js://test.testJSControllerParent",
                        ControllerDef.class);
        Source<?> source = getJavascriptSourceLoader().getSource(descriptor);
        // STEP 1:
        // Parse and create the ControllerDef object for the component
        Definition controller = parser.parse(descriptor, source);
        // STEP 2:
        // 2.1:Verify the CONTROLLERDEF object
        assertTrue(controller instanceof JavascriptControllerDef);
        // Convert from a generic controller to a Javascript type controller
        JavascriptControllerDef obj = (JavascriptControllerDef) controller;
View Full Code Here

        DefDescriptor<RendererDef> descriptor = DefDescriptorImpl.getInstance(
                "js://test.testJSRenderer", RendererDef.class);
        Source<?> source = getJavascriptSourceLoader().getSource(descriptor);
        // STEP 1:
        // Parse and create the RedererDef object for the component
        Definition renderer = parser.parse(descriptor, source);

        // STEP 2:Verify the RENDERERDEF object
        assertTrue(renderer instanceof JavascriptRendererDef);
        // Convert from a generic DEFINITION to a Javascript Renderer Definition
        JavascriptRendererDef obj = (JavascriptRendererDef) renderer;
View Full Code Here

                "js://test.testJSTestSuite", TestSuiteDef.class);
        Source<?> source = getJavascriptSourceLoader().getSource(descriptor);

        // Step 1: Parse the source which refers to a simple component with a
        // reference to Javascript test suite
        Definition testSuite = parser.parse(descriptor, source);
        assertTrue(testSuite instanceof JavascriptTestSuiteDef);

        // Step 2: Gold file the Json output of the test suite object
        serializeAndGoldFile(testSuite, "_JSTestSuite");
View Full Code Here

                TestSuiteDef.class);
        Source<?> source = getJavascriptSourceLoader().getSource(descriptor);

        // Step 1: Parse the source which refers to a simple component with a
        // reference to Javascript test suite
        Definition testSuite = parser.parse(descriptor, source);
        assertTrue(testSuite instanceof JavascriptTestSuiteDef);

        // Step 2: Verify the properties of the JavascriptTestSuiteDef object
        // OBject that is to be verified, Qualified name,
        assertEquals("unexpected qualifiedName of testSuite",
View Full Code Here

    }

    public void testGetSubDefinition() throws Exception {
        @SuppressWarnings("unchecked")
        SubDefDescriptor<?, D> subdesc = Mockito.mock(SubDefDescriptor.class);
        Definition def = Mockito.mock(Definition.class);
        this.subDefs = ImmutableMap.<SubDefDescriptor<?, D>, Definition> of(subdesc, def);
        Object actual = buildDefinition().getSubDefinition(subdesc);
        assertEquals(def, actual);
    }
View Full Code Here

        assertEquals(def, actual);
    }

    public void testGetSubDefinitionNull() throws Exception {
        this.subDefs = ImmutableMap.of();
        Definition actual = buildDefinition().getSubDefinition(null);
        assertNull(actual);
    }
View Full Code Here

TOP

Related Classes of org.auraframework.def.Definition

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.