Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-08-23 16:10:09 +0000
committerrbrooks2010-08-23 16:10:09 +0000
commit4cc065a94cacb6f31ce8a315fb13ef9d4ba1bc5c (patch)
tree34f1c60f4942e4f8dff2da3f97f577e2df785dbb /plugins/org.eclipse.osee.framework.core.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.core.test')
-rw-r--r--plugins/org.eclipse.osee.framework.core.test/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/mocks/Asserts.java27
2 files changed, 29 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.test/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.core.test/META-INF/MANIFEST.MF
index dd7e82cbfa7..df68f684ca2 100644
--- a/plugins/org.eclipse.osee.framework.core.test/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.core.test/META-INF/MANIFEST.MF
@@ -7,4 +7,5 @@ Bundle-Vendor: Eclipse Open System Engineering Environment
Fragment-Host: org.eclipse.osee.framework.core;bundle-version="0.8.3"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.junit4;bundle-version="4.5.0"
-Export-Package: org.eclipse.osee.framework.core.test
+Export-Package: org.eclipse.osee.framework.core.test,
+ org.eclipse.osee.framework.core.test.mocks
diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/mocks/Asserts.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/mocks/Asserts.java
new file mode 100644
index 00000000000..0580fb3696e
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/test/mocks/Asserts.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.core.test.mocks;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.osee.framework.core.operation.IOperation;
+import org.eclipse.osee.framework.core.operation.Operations;
+import org.junit.Assert;
+
+/**
+ * @author Ryan D. Brooks
+ */
+public final class Asserts {
+ public static void testOperation(IOperation operation, int expectedSeverity) {
+ Operations.executeWork(operation, new NullProgressMonitor(), -1);
+ String message = operation.getStatus().toString();
+ Assert.assertEquals(message, expectedSeverity, operation.getStatus().getSeverity());
+ }
+} \ No newline at end of file

Back to the top