Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-06-03 00:37:19 -0400
committerrescobar2010-06-03 00:37:19 -0400
commit2a6eec353100e58262e1bbf08a6788d307d65f1a (patch)
tree8c0808454a3c8198bc59482aa9ee60ce19193e12 /plugins
parent3e629e55787cbd351523cd5c4cd3117364ff06ef (diff)
downloadorg.eclipse.osee-2a6eec353100e58262e1bbf08a6788d307d65f1a.tar.gz
org.eclipse.osee-2a6eec353100e58262e1bbf08a6788d307d65f1a.tar.xz
org.eclipse.osee-2a6eec353100e58262e1bbf08a6788d307d65f1a.zip
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/.classpath7
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/.project28
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/META-INF/MANIFEST.MF9
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/build.properties4
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/AccessTestSuite.java18
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/TestAccess.java57
-rw-r--r--plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/InternalAccessTestSuite.java17
9 files changed, 152 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.framework.access.test/.classpath b/plugins/org.eclipse.osee.framework.access.test/.classpath
new file mode 100644
index 0000000000..8a8f1668cd
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.access.test/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.osee.framework.access.test/.project b/plugins/org.eclipse.osee.framework.access.test/.project
new file mode 100644
index 0000000000..088cac150f
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.access.test/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.osee.framework.access.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.osee.framework.access.test/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.osee.framework.access.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..f7286ca11f
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.access.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Wed Jun 02 20:45:28 MST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/plugins/org.eclipse.osee.framework.access.test/.settings/org.eclipse.pde.core.prefs b/plugins/org.eclipse.osee.framework.access.test/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000000..6a8c51251a
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.access.test/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,4 @@
+#Wed Jun 02 20:45:28 MST 2010
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
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
new file mode 100644
index 0000000000..7650428019
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.access.test/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Access Test
+Bundle-SymbolicName: org.eclipse.osee.framework.access.test;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: Eclipse.org
+Fragment-Host: org.eclipse.osee.framework.access
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.junit4;bundle-version="4.5.0"
diff --git a/plugins/org.eclipse.osee.framework.access.test/build.properties b/plugins/org.eclipse.osee.framework.access.test/build.properties
new file mode 100644
index 0000000000..41eb6ade2b
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.access.test/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/AccessTestSuite.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/AccessTestSuite.java
new file mode 100644
index 0000000000..4c34c577c3
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/AccessTestSuite.java
@@ -0,0 +1,18 @@
+/*
+ * Created on Jun 2, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.framework.access.test;
+
+import org.eclipse.osee.framework.access.test.internal.InternalAccessTestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses( { //
+InternalAccessTestSuite.class, //
+})
+public class AccessTestSuite {
+
+}
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
new file mode 100644
index 0000000000..430448c6af
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/TestAccess.java
@@ -0,0 +1,57 @@
+/*
+ * Created on Jun 2, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.framework.access.test;
+
+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.junit.Assert;
+import org.junit.Test;
+
+public class TestAccess {
+
+ @Test
+ public void testAccess() throws OseeCoreException {
+ OseeAccessService access = new OseeAccessServiceImpl();
+ Assert.assertTrue(access.getAccessTypes().isEmpty());
+
+ AccessHandler handler = new AccessHandler();
+
+ access.addHandler(TestAccessPoint.TYPE, handler);
+
+ Assert.assertEquals(1, access.getHandlerCount(TestAccessPoint.TYPE));
+ Assert.assertFalse(access.getAccessTypes().isEmpty());
+
+ access.removeHandler(TestAccessPoint.TYPE, handler);
+ Assert.assertTrue(access.getAccessTypes().isEmpty());
+ Assert.assertEquals(0, access.getHandlerCount(TestAccessPoint.TYPE));
+ }
+
+ private final static class TestAccessPoint extends OseeAccessPoint<AccessHandler> {
+
+ private static final Type<AccessHandler> TYPE = new Type<AccessHandler>();
+
+ @Override
+ protected void dispatch(AccessHandler handler) {
+ handler.setData("Pass In Information Here");
+ }
+
+ @Override
+ public Type<AccessHandler> getAssociatedType() {
+ return TYPE;
+ }
+ }
+
+ private final class AccessHandler implements OseeAccessHandler {
+
+ // Any Random data needed
+ public void setData(Object object) {
+
+ }
+ }
+}
diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/InternalAccessTestSuite.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/InternalAccessTestSuite.java
new file mode 100644
index 0000000000..3011c07f4f
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/InternalAccessTestSuite.java
@@ -0,0 +1,17 @@
+/*
+ * Created on Jun 2, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.framework.access.test.internal;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses( { //
+//CoreServerInternalTestSuite.class, //
+})
+public class InternalAccessTestSuite {
+
+}

Back to the top