/** Test Protocol on execute a TestSuite that has Children. */ @Test public void testRunSuiteWithChildren() { TestProtocolService protocolService = new TestProtocolService(); TestCase testCase = new TestCase(); testCase.setName("MyName"); TestSuite testSuite = new TestSuite(); testSuite.addChild(testCase); TestResult testResult = new TestResult(); TestResult tcTestResult = new TestResult(); tcTestResult.setFullName(testCase.getFullName()); testResult.add(tcTestResult); assertTrue(testResult.isSuite()); protocolService.set(testSuite, testResult); assertNotNull(protocolService.get(testSuite)); assertNotNull(protocolService.get(testCase)); }
/** * Tests the lookup of a TestStructure based on a relative path name. Path Name like: * /DemoWebRapTests/DialogWidgetsSuite/ConfirmMessageTest * * @throws SystemException for test */ @Test public void testLookUpOfTestStructure() throws SystemException { TestProject project = new TestProject(); project.setName("DemoWebRapTests"); TestSuite suite = new TestSuite(); project.addChild(suite); suite.setName("DialogWidgetsSuite"); TestCase testCase = new TestCase(); testCase.setName("ConfirmMessageTest"); suite.addChild(testCase); TeamChange change = new TeamChange( TeamChangeType.DELETE, "DemoWebRapTests.DialogWidgetsSuite.ConfirmMessageTest", project); TestStructure testStructure = change.getReleatedTestStructure(); assertNotNull("TestStructure expected.", testStructure); assertEquals( "Expecting MyTestCase as teststructure", "ConfirmMessageTest", testStructure.getName()); }