Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-09-23 21:31:56 -0400
committerRyan D. Brooks2010-09-23 21:31:56 -0400
commit28266d0b838f24da11379cba2826715a7964154b (patch)
treec3346e9402e51378890dbcf407a9cb8d135b3936 /plugins
parentf066aba03eb2a328bab79bc6d0f11ca7b65ce36a (diff)
downloadorg.eclipse.osee-28266d0b838f24da11379cba2826715a7964154b.tar.gz
org.eclipse.osee-28266d0b838f24da11379cba2826715a7964154b.tar.xz
org.eclipse.osee-28266d0b838f24da11379cba2826715a7964154b.zip
refinement[ats_UYPM6]: Fix and improve coverage unit tests
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/VectorCastImportTest.java8
-rw-r--r--plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemPersistTest.java6
-rw-r--r--plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/util/CoverageImportTestBlam.java2
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeImportManager.java2
-rw-r--r--plugins/org.eclipse.osee.coverage/support/vcastData/vcast_aggregate_coverage_report.html0
5 files changed, 11 insertions, 7 deletions
diff --git a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/VectorCastImportTest.java b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/VectorCastImportTest.java
index 5d610b47aa..00e200a5bd 100644
--- a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/VectorCastImportTest.java
+++ b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/VectorCastImportTest.java
@@ -205,8 +205,7 @@ public class VectorCastImportTest {
OseeCoverageStore store = OseeCoveragePackageStore.get(coveragePackage, BranchManager.getCommonBranch());
SkynetTransaction transaction =
new SkynetTransaction(BranchManager.getCommonBranch(), "Coverage Package Save");
- CoveragePackageEvent coverageEvent =
- new CoveragePackageEvent(coveragePackage, CoverageEventType.Modified);
+ CoveragePackageEvent coverageEvent = new CoveragePackageEvent(coveragePackage, CoverageEventType.Modified);
store.save(transaction, coverageEvent);
transaction.execute();
@@ -290,8 +289,13 @@ public class VectorCastImportTest {
OseeData.getFile("vcast.wrk/CCAST_.CFG"));
Lib.writeStringToFile(AFile.readFile(Activator.getInstance().getPluginFile("support/vcastData/CCAST_.CFG")),
OseeData.getFile("vcast.wrk/build_info.xml"));
+
+ // create vcast dir and files within
OseeData.getFolder("vcast.wrk/vcast").getLocation().toFile();
Lib.writeStringToFile(
+ AFile.readFile(Activator.getInstance().getPluginFile("support/vcastData/vcast_aggregate_coverage_report.html")),
+ OseeData.getFile("vcast.wrk/vcast/vcast_aggregate_coverage_report.html"));
+ Lib.writeStringToFile(
AFile.readFile(Activator.getInstance().getPluginFile("support/vcastData/vcast/test_main.2.LIS")),
OseeData.getFile("vcast.wrk/vcast/test_main.2.LIS"));
Lib.writeStringToFile(
diff --git a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemPersistTest.java b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemPersistTest.java
index 8e0ef28ecb..f8d7db9f16 100644
--- a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemPersistTest.java
+++ b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/model/CoverageItemPersistTest.java
@@ -108,8 +108,8 @@ public class CoverageItemPersistTest {
Assert.assertEquals(coverageGuid, coverageEvent.getPackage().getGuid());
Assert.assertEquals(coverageName, coverageEvent.getPackage().getName());
Assert.assertEquals(CoverageEventType.Modified, coverageEvent.getPackage().getEventType());
- // 10 coverage items added and one coverage unit == 11
- Assert.assertEquals(11, coverageEvent.getCoverages().size());
+ // 1 coverage item added and 1 coverage unit == 2
+ Assert.assertEquals(2, coverageEvent.getCoverages().size());
Assert.assertEquals(CoverageEventType.Added, coverageEvent.getCoverages().iterator().next().getEventType());
Assert.assertEquals(10, ci.getTestUnits().size());
@@ -149,7 +149,7 @@ public class CoverageItemPersistTest {
artifact = new OseeCoverageUnitStore(parentCu, BranchManager.getCommonBranch()).getArtifact(false);
Assert.assertNull(artifact);
Assert.assertEquals(0, CoverageTestUtil.getAllCoverageArtifacts().size());
- Assert.assertEquals(11, coverageEvent.getCoverages().size());
+ Assert.assertEquals(1, coverageEvent.getCoverages().size());
Assert.assertEquals(CoverageEventType.Deleted, coverageEvent.getCoverages().iterator().next().getEventType());
}
diff --git a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/util/CoverageImportTestBlam.java b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/util/CoverageImportTestBlam.java
index e06720f1b2..a093bb8381 100644
--- a/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/util/CoverageImportTestBlam.java
+++ b/plugins/org.eclipse.osee.coverage.test/src/org/eclipse/osee/coverage/test/util/CoverageImportTestBlam.java
@@ -86,7 +86,7 @@ public class CoverageImportTestBlam extends AbstractCoverageBlam implements ICov
coverageImport.setCoverageUnitFileContentsProvider(new SimpleCoverageUnitFileContentsProvider());
try {
for (String filename : fileList) {
- System.err.println(String.format("Importing [%s]", PATH + filename));
+ // System.err.println(String.format("Importing [%s]", PATH + filename));
URL url = CoverageImport1TestBlam.class.getResource(PATH + filename);
CoverageUnit coverageUnit =
SampleJavaFileParser.createCodeUnit(url, coverageImport.getCoverageUnitFileContentsProvider());
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeImportManager.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeImportManager.java
index 08cbc75ed9..a7d56a9455 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeImportManager.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/merge/MergeImportManager.java
@@ -245,7 +245,7 @@ public class MergeImportManager {
}
// This is new item
else if (MatchType.isNoMatch(matchItem.getMatchType())) {
- System.err.println("NEW ITEM " + matchItem.getMatchType());
+ // System.err.println("NEW ITEM " + matchItem.getMatchType());
// Check if parent item exists
ICoverage parentImportItem = importItem.getParent();
// If null, this is top level item, just add to package
diff --git a/plugins/org.eclipse.osee.coverage/support/vcastData/vcast_aggregate_coverage_report.html b/plugins/org.eclipse.osee.coverage/support/vcastData/vcast_aggregate_coverage_report.html
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/plugins/org.eclipse.osee.coverage/support/vcastData/vcast_aggregate_coverage_report.html

Back to the top