Author: kono
Date: 2011-08-17 13:43:46 -0700 (Wed, 17 Aug 2011)
New Revision: 26588
Modified:
core3/impl/trunk/core-task-impl/src/test/java/org/cytoscape/task/internal/quickstart/remote/BioGridPreprocessorTest.java
Log:
Some test cases had been added.
Modified:
core3/impl/trunk/core-task-impl/src/test/java/org/cytoscape/task/internal/quickstart/remote/BioGridPreprocessorTest.java
===================================================================
---
core3/impl/trunk/core-task-impl/src/test/java/org/cytoscape/task/internal/quickstart/remote/BioGridPreprocessorTest.java
2011-08-17 20:31:56 UTC (rev 26587)
+++
core3/impl/trunk/core-task-impl/src/test/java/org/cytoscape/task/internal/quickstart/remote/BioGridPreprocessorTest.java
2011-08-17 20:43:46 UTC (rev 26588)
@@ -17,6 +17,8 @@
public class BioGridPreprocessorTest {
+
+ private static final String OUTPUT_DIR = "target/testoutput";
@Mock
CyProperty<Properties> properties;
@@ -29,10 +31,10 @@
MockitoAnnotations.initMocks(this);
when(properties.getProperties()).thenReturn(new Properties());
- final File sampleDirectory = new File("target/testoutput");
- boolean success = sampleDirectory.mkdir();
+ final File sampleDirectory = new File(OUTPUT_DIR);
+ if(sampleDirectory.isDirectory() == false)
+ assertTrue(sampleDirectory.mkdir());
- assertTrue(success);
when(config.getSettingLocation()).thenReturn(sampleDirectory);
}
@@ -48,6 +50,13 @@
processor.setSource(file.toURI().toURL());
processor.processFile();
+ File testDir = new File(OUTPUT_DIR, "interactions");
+ assertTrue(testDir.exists());
+ File[] fileList = testDir.listFiles();
+ assertNotNull(fileList);
+
+ // 23 species specific files should be created.
+ assertEquals(23, fileList.length);
}
}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.