use of org.eclipse.xsd.XSDSchemaDirective in project webtools.sourceediting by eclipse.
the class XSDUnusedTests method testCircularIncludes001.
public void testCircularIncludes001() {
XSDSchema schema = getXSDSchema(TC_ROOT_FOLDER + "/Includes/circular/test/Main001.xsd");
importManager.performRemoval(schema);
List list = importManager.getUnusedXSDDirectives();
assertTrue(list.size() == 1);
XSDSchemaDirective d1 = (XSDSchemaDirective) list.get(0);
assertTrue("../Include4.xsd".equals(d1.getSchemaLocation()));
}
use of org.eclipse.xsd.XSDSchemaDirective in project webtools.sourceediting by eclipse.
the class XSDUnusedTests method testImport001.
public void testImport001() {
XSDSchema schema = getXSDSchema(TC_ROOT_FOLDER + "/Simple/Test.xsd");
importManager.performRemoval(schema);
List list = importManager.getUnusedXSDDirectives();
assertTrue(list.size() == 1);
XSDSchemaDirective d1 = (XSDSchemaDirective) list.get(0);
assertTrue("Import001.xsd".equals(d1.getSchemaLocation()));
}
use of org.eclipse.xsd.XSDSchemaDirective in project webtools.sourceediting by eclipse.
the class XSDUnusedTests method testImport003.
public void testImport003() {
XSDSchema schema = getXSDSchema(TC_ROOT_FOLDER + "/Unused/test/Main002.xsd");
importManager.performRemoval(schema);
List list = importManager.getUnusedXSDDirectives();
assertTrue(list.size() == 1);
XSDSchemaDirective d1 = (XSDSchemaDirective) list.get(0);
assertTrue("../Import1.xsd".equals(d1.getSchemaLocation()));
}
use of org.eclipse.xsd.XSDSchemaDirective in project webtools.sourceediting by eclipse.
the class XSDUnusedTests method testImport001RepeatRemovalTwice.
public void testImport001RepeatRemovalTwice() {
XSDSchema schema = getXSDSchema(TC_ROOT_FOLDER + "/Simple/Test.xsd");
importManager.performRemoval(schema);
List list = importManager.getUnusedXSDDirectives();
assertTrue(list.size() == 1);
XSDSchemaDirective d1 = (XSDSchemaDirective) list.get(0);
assertTrue("Import001.xsd".equals(d1.getSchemaLocation()));
importManager.performRemoval(schema);
list = importManager.getUnusedXSDDirectives();
assertTrue(list.size() == 0);
importManager.performRemoval(schema);
list = importManager.getUnusedXSDDirectives();
assertTrue(list.size() == 0);
}
use of org.eclipse.xsd.XSDSchemaDirective in project webtools.sourceediting by eclipse.
the class XSDUnusedTests method testImport005.
public void testImport005() {
XSDSchema schema = getXSDSchema(TC_ROOT_FOLDER + "/Unused/test/Main004.xsd");
importManager.performRemoval(schema);
List list = importManager.getUnusedXSDDirectives();
assertTrue(list.size() == 2);
XSDSchemaDirective d1 = (XSDSchemaDirective) list.get(1);
assertTrue("../Import3.xsd".equals(d1.getSchemaLocation()));
XSDSchemaDirective d2 = (XSDSchemaDirective) list.get(0);
assertTrue("../Include1.xsd".equals(d2.getSchemaLocation()));
}
Aggregations