Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-06-04 21:19:52 -0400
committerrescobar2010-06-04 21:19:52 -0400
commitd4b3c173e3ba66883ac7305cb5c7124c9013be28 (patch)
treeec08853444ee63d226be8d5e683f85d85679ff35 /plugins/org.eclipse.osee.framework.access.test
parent073bb7c8b16acd3ff5fa0a53b46d9829b2be4859 (diff)
downloadorg.eclipse.osee-d4b3c173e3ba66883ac7305cb5c7124c9013be28.tar.gz
org.eclipse.osee-d4b3c173e3ba66883ac7305cb5c7124c9013be28.tar.xz
org.eclipse.osee-d4b3c173e3ba66883ac7305cb5c7124c9013be28.zip
Diffstat (limited to 'plugins/org.eclipse.osee.framework.access.test')
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/TestAccess.java66
1 files changed, 59 insertions, 7 deletions
diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/TestAccess.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/TestAccess.java
index 430448c6af..de629bedae 100644
--- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/TestAccess.java
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/TestAccess.java
@@ -5,11 +5,16 @@
*/
package org.eclipse.osee.framework.access.test;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.osee.framework.access.OseeAccessHandler;
import org.eclipse.osee.framework.access.OseeAccessService;
import org.eclipse.osee.framework.access.internal.OseeAccessPoint;
import org.eclipse.osee.framework.access.internal.OseeAccessServiceImpl;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.operation.AbstractOperation;
+import org.eclipse.osee.framework.core.operation.IOperation;
import org.junit.Assert;
import org.junit.Test;
@@ -30,6 +35,11 @@ public class TestAccess {
access.removeHandler(TestAccessPoint.TYPE, handler);
Assert.assertTrue(access.getAccessTypes().isEmpty());
Assert.assertEquals(0, access.getHandlerCount(TestAccessPoint.TYPE));
+
+ OseeAccessPoint<?> accessPoint = new TestAccessPoint();
+ IStatus status = access.dispatch(new NullProgressMonitor(), "", accessPoint);
+ // Assert.assertTrue(handler.isWasChecked());
+
}
private final static class TestAccessPoint extends OseeAccessPoint<AccessHandler> {
@@ -37,21 +47,63 @@ public class TestAccess {
private static final Type<AccessHandler> TYPE = new Type<AccessHandler>();
@Override
- protected void dispatch(AccessHandler handler) {
- handler.setData("Pass In Information Here");
+ public Type<AccessHandler> getAssociatedType() {
+ return TYPE;
}
+ //
+ // @Override
+ // protected void dispatch(AccessHandler handler) {
+ // handler.setData("Pass In Information Here");
+ // // Initialize data
+ //
+ // // run the rule
+ //
+ // }
+
@Override
- public Type<AccessHandler> getAssociatedType() {
- return TYPE;
+ protected IStatus dispatch(AccessHandler handler) {
+ handler.create("A", "B", "C");
+ return null;
}
}
- private final class AccessHandler implements OseeAccessHandler {
+ private final class AccessHandler extends AbstractOperation implements OseeAccessHandler {
- // Any Random data needed
- public void setData(Object object) {
+ private final String a;
+ private final String b;
+
+ public AccessHandler() {
+ this("", "");
+ }
+ public AccessHandler(String a, String b) {
+ super("", "");
+ this.a = a;
+ this.b = b;
}
+
+ public IOperation create(String string, String string2, String string3) {
+ return new AccessHandler();
+ }
+
+ @Override
+ protected void doWork(IProgressMonitor monitor) throws Exception {
+
+ }
+
+ // Any Random data needed
+ // public void setData(Object object) {
+ // wasChecked = true;
+ // }
+
+ // public void setWasChecked(boolean wasChecked) {
+ // this.wasChecked = wasChecked;
+ // }
+ //
+ // public boolean isWasChecked() {
+ // return wasChecked;
+ // }
+
}
}

Back to the top