use of org.eclipse.n4js.tester.domain.TestCase in project n4js by eclipse.
the class TesterDomainTest method testTestTreeClone.
/**
*/
@Test
public void testTestTreeClone() throws Exception {
final List<TestSuite> originalTestSuites = newArrayList();
final TestSuite originalTestSuite = new TestSuite("name");
final TestCase originalTestCase = new TestCase(new ID("testId"), "testId", "testId", "testId", "testId", URI.createURI("testURI_testId"));
originalTestSuite.add(originalTestCase);
originalTestSuites.add(originalTestSuite);
final TestTree originalTestTree = new TestTree(new ID("value"), originalTestSuites);
final TestTree copyTestTree = originalTestTree.clone();
assertEquals(originalTestTree, copyTestTree);
assertFalse(originalTestTree == copyTestTree);
assertFalse(originalTestSuites == copyTestTree.getSuites());
assertFalse(originalTestSuite == getOnlyElement(copyTestTree.getSuites()));
assertEquals(originalTestCase, getOnlyElement(getOnlyElement(copyTestTree.getSuites()).getTestCases()));
assertFalse(originalTestCase == getOnlyElement(getOnlyElement(copyTestTree.getSuites()).getTestCases()));
}
Aggregations