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"));