1 19 20 package org.netbeans.modules.xml.axi; 21 22 import junit.framework.*; 23 import org.netbeans.modules.xml.axi.visitor.DeepAXITreeVisitor; 24 25 26 30 public class CyclicModelTest extends AbstractTestCase { 31 32 public static final String SCHEMA_A = "resources/schemaA.xsd"; 33 public static final String SCHEMA_B = "resources/schemaB.xsd"; 34 public static final String SCHEMA_C = "resources/schemaC.xsd"; 35 36 39 public CyclicModelTest(String testName) { 40 super(testName, SCHEMA_A, null); 41 } 42 43 46 public CyclicModelTest(String testName, String schemaFile, String elementName) { 47 super(testName, schemaFile, elementName); 48 } 49 50 public static Test suite() { 51 TestSuite suite = new TestSuite(CyclicModelTest.class); 52 return suite; 53 } 54 55 public void testCyclicModelsNotExpanded() { 56 DeepAXITreeVisitor visitor = new DeepAXITreeVisitor(); 57 long startTime = System.currentTimeMillis(); 58 visitor.visit(getAXIModel().getRoot()); 59 long endTime = System.currentTimeMillis(); 60 } 61 62 public void testCyclicModelsExpanded() throws Exception { 63 AXIModel modelA = getAXIModel(); 64 AXIModel modelB = getModel(SCHEMA_B); 65 AXIModel modelC = getModel(SCHEMA_C); 66 DeepAXITreeVisitor visitor = new DeepAXITreeVisitor(); 67 visitor.visit(modelA.getRoot()); 68 visitor.visit(modelB.getRoot()); 69 visitor.visit(modelC.getRoot()); 70 modelA.sync(); 71 modelB.sync(); 72 modelC.sync(); 73 } 74 } 75 | Popular Tags |