Package org.auraframework.impl.javascript.testsuite

Examples of org.auraframework.impl.javascript.testsuite.JavascriptTestCaseDef


                    mocksMap = Maps.newHashMap(suiteMocksMap);
                    putMocks(mocksMap, caseMocks);
                    mocks = Lists.newArrayList(mocksMap.values());
                }

                builder.caseDefs.add(new JavascriptTestCaseDef(descriptor, key, null, attributes, defType, labels,
                        browsers, mocks, auraErrorsExpectedDuringInit, scrumTeam, owner));
            }
        }

        return builder.build();
View Full Code Here


        List<TestCaseDef> testCases = ((JavascriptTestSuiteDef) testSuite)
                .getTestCaseDefs();
        assertEquals(3, testCases.size());
        for (Object o : testCases.toArray()) {
            assertTrue(o instanceof JavascriptTestCaseDef);
            JavascriptTestCaseDef testCaseDef = (JavascriptTestCaseDef) o;
            Map<String, Object> attributes = testCaseDef.getAttributeValues();
            if (testCaseDef.getName().equals("testHelloWorld")) {
                assertTrue(attributes.size() == 1);
                assertTrue(attributes.containsKey("num"));
                assertEquals("2", attributes.get("num"));
                // OBject that is to be verified, Qualified name
                assertEquals("unexpected qualifiedName of testHelloWorld",
                        "js://test.testJSTestSuite/TESTCASE$testHelloWorld",
                        ((DefinitionImpl<?>) o).getDescriptor()
                                .getQualifiedName());
            } else if (testCaseDef.getName().equals("testHelloWorld2")) {
                assertTrue(attributes.size() == 1);
                assertTrue(attributes.containsKey("num"));
                // Should get the default Attribute value
                assertEquals("5", attributes.get("num"));
                // OBject that is to be verified, Qualified name,
                assertEquals("unexpected qualifiedName of testHelloWorld2",
                        "js://test.testJSTestSuite/TESTCASE$testHelloWorld2",
                        ((DefinitionImpl<?>) o).getDescriptor()
                                .getQualifiedName());
            } else if (testCaseDef.getName().equals("testHelloWorld3")) {
                assertTrue(attributes.size() == 2);
                assertTrue(attributes.containsKey("num"));
                assertEquals("4", attributes.get("num"));
                assertTrue(attributes.containsKey("alpha"));
                assertEquals("A", attributes.get("alpha"));
View Full Code Here

        List<TestCaseDef> testCases = ((JavascriptTestSuiteDef) testSuite)
                .getTestCaseDefs();
        assertEquals(2, testCases.size());
        for (Object o : testCases.toArray()) {
            assertTrue(o instanceof JavascriptTestCaseDef);
            JavascriptTestCaseDef testCaseDef = (JavascriptTestCaseDef) o;
            Map<String, Object> attributes = testCaseDef.getAttributeValues();
            if (testCaseDef.getName().equals("testHelloWorld")) {
                assertTrue(attributes.size() == 1);
                assertTrue(attributes.containsKey("num"));
                assertEquals("2", attributes.get("num"));
                // OBject that is to be verified, Qualified name
                assertEquals(
                        "unexpected qualifiedName of testHelloWorld",
                        "js://test.testJSTestSuiteWithoutAttributes/TESTCASE$testHelloWorld",
                        ((DefinitionImpl<?>) o).getDescriptor()
                                .getQualifiedName());
            } else if (testCaseDef.getName().equals("testHelloWorld3")) {
                assertTrue(attributes.size() == 0);
                // OBject that is to be verified, Qualified name
                assertEquals(
                        "unexpected qualifiedName of testHelloWorld3",
                        "js://test.testJSTestSuiteWithoutAttributes/TESTCASE$testHelloWorld3",
View Full Code Here

TOP

Related Classes of org.auraframework.impl.javascript.testsuite.JavascriptTestCaseDef

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.