[431856] [CBI] Enable JUnit tests for sourceediting.tests repo The unzip util expects a flat directory, but this isn't the case for maven. Eclipse-BundleShape: dir is an alternate.
diff --git a/tests/org.eclipse.wst.xml.tests.encoding/src/org/eclipse/wst/xml/tests/encoding/ZippedTest.java b/tests/org.eclipse.wst.xml.tests.encoding/src/org/eclipse/wst/xml/tests/encoding/ZippedTest.java index 18f5232..9f416aa 100644 --- a/tests/org.eclipse.wst.xml.tests.encoding/src/org/eclipse/wst/xml/tests/encoding/ZippedTest.java +++ b/tests/org.eclipse.wst.xml.tests.encoding/src/org/eclipse/wst/xml/tests/encoding/ZippedTest.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 IBM Corporation and others. + * Copyright (c) 2010, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,8 +10,6 @@ *******************************************************************************/ package org.eclipse.wst.xml.tests.encoding; -import java.io.File; - import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; @@ -39,9 +37,9 @@ String destinationProjectString = fProject.getLocation().toOSString(); String destinationFolder = destinationProjectString + "/"; - File zipFile = TestsPlugin.getTestFile("testfiles.zip"); + //File zipFile = TestsPlugin.getTestFile("testfiles.zip"); ProjectUnzipUtility projUtil = new ProjectUnzipUtility(); - projUtil.unzipAndImport(zipFile, destinationFolder); + projUtil.unzipAndImport(TestsPlugin.getTestResource("testfiles.zip"), destinationFolder); projUtil.initJavaProject(TEST_PROJECT_NAME); fProject.refreshLocal(IResource.DEPTH_INFINITE, null); isSetUp = true;