diff options
author | ddunne | 2011-05-18 19:22:42 +0000 |
---|---|---|
committer | Ryan D. Brooks | 2011-05-18 19:22:42 +0000 |
commit | 1bb1a658ff009d68cdcef46391ae68f871a3dd31 (patch) | |
tree | d6f8fabe6e7b1cc2a0cbd09f72a4b4114066e0d1 | |
parent | 3ccb879066af40aae4bb43c4432bb386c8f16c38 (diff) | |
download | org.eclipse.osee-1bb1a658ff009d68cdcef46391ae68f871a3dd31.tar.gz org.eclipse.osee-1bb1a658ff009d68cdcef46391ae68f871a3dd31.tar.xz org.eclipse.osee-1bb1a658ff009d68cdcef46391ae68f871a3dd31.zip |
refinement: Improve cleanup and move test to SAW_Bld_2 branch for NativeArtifactTest
-rw-r--r-- | plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/NativeArtifactTest.java | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/NativeArtifactTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/NativeArtifactTest.java index 64af5545006..e0c569fa6cf 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/NativeArtifactTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/artifact/NativeArtifactTest.java @@ -26,20 +26,26 @@ import org.eclipse.osee.framework.plugin.core.util.OseeData; import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; import org.eclipse.osee.framework.skynet.core.utility.CsvArtifact; import org.eclipse.osee.support.test.util.DemoSawBuilds; +import org.junit.AfterClass; +import org.junit.BeforeClass; /** * @author Ryan D. Brooks */ public class NativeArtifactTest { - @org.junit.Test - public void testCleanupPre() throws Exception { - cleanup(); + @BeforeClass + @AfterClass + public static void cleanup() throws Exception { + Collection<Artifact> arts = + ArtifactQuery.getArtifactListFromName(NativeArtifactTest.class.getSimpleName(), DemoSawBuilds.SAW_Bld_2, + EXCLUDE_DELETED); + new PurgeArtifacts(arts).execute(); } @org.junit.Test public void testNativeArtifact() throws Exception { - CsvArtifact csvArtifact = CsvArtifact.getCsvArtifact(getClass().getSimpleName(), DemoSawBuilds.SAW_Bld_1, true); + CsvArtifact csvArtifact = CsvArtifact.getCsvArtifact(getClass().getSimpleName(), DemoSawBuilds.SAW_Bld_2, true); assertNotNull(csvArtifact); Artifact artifact = csvArtifact.getArtifact(); assertTrue(artifact.isAttributeTypeValid(CoreAttributeTypes.NativeContent)); @@ -78,18 +84,8 @@ public class NativeArtifactTest { } } - @org.junit.Test - public void testCleanupPost() throws Exception { - cleanup(); - } - private Artifact getNativeArtifact() throws Exception { - return CsvArtifact.getCsvArtifact(getClass().getSimpleName(), DemoSawBuilds.SAW_Bld_1, false).getArtifact(); + return CsvArtifact.getCsvArtifact(getClass().getSimpleName(), DemoSawBuilds.SAW_Bld_2, false).getArtifact(); } - private void cleanup() throws Exception { - Collection<Artifact> arts = - ArtifactQuery.getArtifactListFromName(getClass().getSimpleName(), DemoSawBuilds.SAW_Bld_1, EXCLUDE_DELETED); - new PurgeArtifacts(arts).execute(); - } } |