Example #1
0
 public void testLoadWindowsFile() throws Exception {
   setUpProject();
   WARProductModel model = new WARProductModel();
   String separator = File.separator;
   String fileName = separator + "testWin.warproduct";
   ClassLoader classLoader = getClass().getClassLoader();
   model.load(classLoader.getResourceAsStream(fileName), false);
   IWARProduct product = (IWARProduct) model.getProduct();
   IPath webXml = product.getWebXml();
   IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
   IPath absolutWebXmlPath = wsRoot.getLocation().append(webXml);
   File file = new File(absolutWebXmlPath.toOSString());
   assertTrue(file.exists());
 }