Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2011-05-18 15:22:18 -0400
committerRyan D. Brooks2011-05-18 15:22:18 -0400
commit3ccb879066af40aae4bb43c4432bb386c8f16c38 (patch)
treef32cbcbdb839e40d37653858b1b2c52ed8bc9e95 /plugins/org.eclipse.osee.framework.skynet.core.test
parentd394d2b2acd8eb7f160e11701e8f05e09f2c427f (diff)
downloadorg.eclipse.osee-3ccb879066af40aae4bb43c4432bb386c8f16c38.tar.gz
org.eclipse.osee-3ccb879066af40aae4bb43c4432bb386c8f16c38.tar.xz
org.eclipse.osee-3ccb879066af40aae4bb43c4432bb386c8f16c38.zip
refinement: Improve cleanup and move test to SAW_Bld_2 branch for CsvArtifactTest
Diffstat (limited to 'plugins/org.eclipse.osee.framework.skynet.core.test')
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifactTest.java25
1 files changed, 10 insertions, 15 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifactTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifactTest.java
index 553b8875e67..0776f84c279 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifactTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifactTest.java
@@ -19,6 +19,8 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.PurgeArtifacts;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.support.test.util.DemoSawBuilds;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
/**
* @author Donald G. Dunne
@@ -29,14 +31,16 @@ public class CsvArtifactTest {
private static String csvData = "Name, Value1, Value2\narf,1,3\nbarn,3,5";
private static String appendData = "snarf,6,3";
- @org.junit.Test
- public void testCleanupPre() throws Exception {
- cleanup();
+ @BeforeClass
+ @AfterClass
+ public static void cleanup() throws Exception {
+ Collection<Artifact> arts = ArtifactQuery.getArtifactListFromName(id, DemoSawBuilds.SAW_Bld_2, EXCLUDE_DELETED);
+ new PurgeArtifacts(arts).execute();
}
@org.junit.Test
public void testCreateCsvArtifact() throws Exception {
- CsvArtifact csv = CsvArtifact.getCsvArtifact(id, DemoSawBuilds.SAW_Bld_1, true);
+ CsvArtifact csv = CsvArtifact.getCsvArtifact(id, DemoSawBuilds.SAW_Bld_2, true);
assertEquals(csv.getCsvData(), "");
csv.getArtifact().setName(id);
csv.setCsvData(csvData);
@@ -45,7 +49,7 @@ public class CsvArtifactTest {
@org.junit.Test
public void testgetCsvArtifactAndAppendData() throws Exception {
- CsvArtifact csvArt = CsvArtifact.getCsvArtifact(id, DemoSawBuilds.SAW_Bld_1, false);
+ CsvArtifact csvArt = CsvArtifact.getCsvArtifact(id, DemoSawBuilds.SAW_Bld_2, false);
assertNotNull(csvArt);
assertEquals(csvData, csvArt.getCsvData());
csvArt.appendData(appendData);
@@ -54,18 +58,9 @@ public class CsvArtifactTest {
@org.junit.Test
public void testCsvGetData() throws Exception {
- CsvArtifact csvArt = CsvArtifact.getCsvArtifact(id, DemoSawBuilds.SAW_Bld_1, false);
+ CsvArtifact csvArt = CsvArtifact.getCsvArtifact(id, DemoSawBuilds.SAW_Bld_2, false);
assertNotNull(csvArt);
assertEquals(csvData + "\n" + appendData, csvArt.getCsvData());
}
- @org.junit.Test
- public void testCleanupPost() throws Exception {
- cleanup();
- }
-
- private void cleanup() throws Exception {
- Collection<Artifact> arts = ArtifactQuery.getArtifactListFromName(id, DemoSawBuilds.SAW_Bld_1, EXCLUDE_DELETED);
- new PurgeArtifacts(arts).execute();
- }
}

Back to the top