Skip to content
Snippets Groups Projects
Commit 14d472db authored by anttil's avatar anttil
Browse files

SWE-22 / SP-641: Remove eclipse/ant dependencies from tests

SVN: 28942
parent cb7b45b4
No related branches found
No related tags found
Loading
...@@ -2,11 +2,11 @@ apply from: 'http://svncisd.ethz.ch/repos/cisd/gradle/trunk/javaproject.gradle' ...@@ -2,11 +2,11 @@ apply from: 'http://svncisd.ethz.ch/repos/cisd/gradle/trunk/javaproject.gradle'
// apply from: 'file:///Users/anttil/Documents/workspace_openbis/gradle/javaproject.gradle' // apply from: 'file:///Users/anttil/Documents/workspace_openbis/gradle/javaproject.gradle'
dependencies { dependencies {
compile 'cisd:base:r27861', compile 'cisd:cisd-base:r27861',
'springframework:spring-webmvc:2.5.6.SEC01-CISD', 'springframework:spring-webmvc:2.5.6.SEC01-CISD',
'springframework:spring-aop:2.5.6.SEC01', 'springframework:spring-aop:2.5.6.SEC01',
'javax:servlet-api:3.0', 'javax:servlet-api:3.0',
'cisd:args4j:9.11.2', 'cisd:cisd-args4j:9.11.2',
'python:jython:2.5.2', 'python:jython:2.5.2',
'apache:log4j:1.2.15', 'apache:log4j:1.2.15',
'javax:mail:1.4.3', 'javax:mail:1.4.3',
......
...@@ -31,7 +31,7 @@ import org.apache.poi.ss.usermodel.Sheet; ...@@ -31,7 +31,7 @@ import org.apache.poi.ss.usermodel.Sheet;
public class ExcelTestUtil public class ExcelTestUtil
{ {
private static final String TEST_FOLDER = "../common/sourceTest/java/"; private static final String TEST_FOLDER = "sourceTest/java/";
public static final Sheet getSheet(Class<?> excelTestClass, String excelFileName) public static final Sheet getSheet(Class<?> excelTestClass, String excelFileName)
throws Exception throws Exception
......
...@@ -36,17 +36,22 @@ import classycle.util.WildCardPattern; ...@@ -36,17 +36,22 @@ import classycle.util.WildCardPattern;
import ch.systemsx.cisd.common.filesystem.FileUtilities; import ch.systemsx.cisd.common.filesystem.FileUtilities;
/** /**
* Unit test checking dependency definitions by Classycle. Dependency definition file * Unit test checking dependency definitions by Classycle. Dependency definition file is assumed to
* is assumed to be <tt>resource/dependency-structure.dff</tt> . * be <tt>resource/dependency-structure.dff</tt> .
* *
* @author Franz-Josef Elmer * @author Franz-Josef Elmer
*/ */
public class DependencyCheckingTest extends AssertJUnit public class DependencyCheckingTest extends AssertJUnit
{ {
private static final String PATH_TO_DEPENDENCY_STRUCTURE_DDF = "resource/dependency-structure.ddf"; private static final String PATH_TO_DEPENDENCY_STRUCTURE_DDF =
"resource/dependency-structure.ddf";
private static final String CLASSES_FOLDER = "targets/classes"; private static final String CLASSES_FOLDER = "targets/classes";
private static final String ANT_CLASSES_FOLDER = "targets/ant/classes"; private static final String ANT_CLASSES_FOLDER = "targets/ant/classes";
private static final String GRADLE_CLASSES_FOLDER = "out/classes/main";
@Test @Test
public void test() public void test()
{ {
...@@ -78,11 +83,19 @@ public class DependencyCheckingTest extends AssertJUnit ...@@ -78,11 +83,19 @@ public class DependencyCheckingTest extends AssertJUnit
private String[] getClassPaths() private String[] getClassPaths()
{ {
if (new File(GRADLE_CLASSES_FOLDER).isDirectory())
{
return new String[]
{ GRADLE_CLASSES_FOLDER };
}
String classes = getPathToClassesCompiledByEclipse(); String classes = getPathToClassesCompiledByEclipse();
String path = new File(classes).isDirectory() ? classes : ANT_CLASSES_FOLDER; String path = new File(classes).isDirectory() ? classes : ANT_CLASSES_FOLDER;
return new String[] { path}; return new String[]
{ path };
} }
/** /**
* Returns the relative path to the class files compiled by Eclipse. * Returns the relative path to the class files compiled by Eclipse.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment