Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-08-23 12:10:09 -0400
committerrbrooks2010-08-23 12:10:09 -0400
commit4cc065a94cacb6f31ce8a315fb13ef9d4ba1bc5c (patch)
tree34f1c60f4942e4f8dff2da3f97f577e2df785dbb /plugins/org.eclipse.osee.framework.access.test
parent0170ef4522ff72ed546a200ad60926d8d36b9637 (diff)
downloadorg.eclipse.osee-4cc065a94cacb6f31ce8a315fb13ef9d4ba1bc5c.tar.gz
org.eclipse.osee-4cc065a94cacb6f31ce8a315fb13ef9d4ba1bc5c.tar.xz
org.eclipse.osee-4cc065a94cacb6f31ce8a315fb13ef9d4ba1bc5c.zip
create and use Asserts.testOperation to standardize testing operations
Diffstat (limited to 'plugins/org.eclipse.osee.framework.access.test')
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/OnEditOperationTest.java14
2 files changed, 6 insertions, 11 deletions
diff --git a/plugins/org.eclipse.osee.framework.access.test/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.access.test/META-INF/MANIFEST.MF
index 39eff82ef3..f03867ff34 100644
--- a/plugins/org.eclipse.osee.framework.access.test/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.access.test/META-INF/MANIFEST.MF
@@ -8,4 +8,5 @@ Fragment-Host: org.eclipse.osee.framework.access;bundle-version="0.9.5"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.junit4;bundle-version="4.5.0"
Export-Package: org.eclipse.osee.framework.access.test
-Import-Package: org.eclipse.osee.framework.core.model.access.exp
+Import-Package: org.eclipse.osee.framework.core.model.access.exp,
+ org.eclipse.osee.framework.core.test.mocks
diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/OnEditOperationTest.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/OnEditOperationTest.java
index 89c7a5f7d9..e8e2504d9c 100644
--- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/OnEditOperationTest.java
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/OnEditOperationTest.java
@@ -13,12 +13,10 @@ package org.eclipse.osee.framework.access.test.internal;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.DefaultBasicArtifact;
import org.eclipse.osee.framework.core.model.IBasicArtifact;
import org.eclipse.osee.framework.core.operation.IOperation;
-import org.eclipse.osee.framework.core.operation.LogProgressMonitor;
-import org.eclipse.osee.framework.core.operation.Operations;
+import org.eclipse.osee.framework.core.test.mocks.Asserts;
import org.eclipse.osee.framework.lifecycle.AbstractLifecycleOperation;
import org.eclipse.osee.framework.lifecycle.ILifecycleService;
import org.eclipse.osee.framework.lifecycle.LifecycleServiceImpl;
@@ -35,7 +33,7 @@ import org.junit.Test;
public class OnEditOperationTest {
@Test
- public void testOperation() throws OseeCoreException {
+ public void testOperation() {
ILifecycleService service = new LifecycleServiceImpl();
// service.addHandler(ChangeMgmtChkPoint.TYPE, new ChangeMgmtHandler(new MockAccessCheckProvider()));
@@ -46,11 +44,7 @@ public class OnEditOperationTest {
IBasicArtifact<?> user = new DefaultBasicArtifact(0, "1", "user");
List<IBasicArtifact<?>> artsToChk = new ArrayList<IBasicArtifact<?>>();
artsToChk.add(new DefaultBasicArtifact(1, "2", "check me out"));
- IOperation op = new OnEditOperation(service, user, artsToChk);
- Operations.executeWork(op, new LogProgressMonitor(), -1.0);
-
- IStatus status = op.getStatus();
- Assert.assertTrue(status.isOK());
-
+ IOperation operation = new OnEditOperation(service, user, artsToChk);
+ Asserts.testOperation(operation, IStatus.OK);
}
}

Back to the top