summaryrefslogtreecommitdiffstats
path: root/sandbox/kgoodson/events/play/src/test/java/com/example/TestChanges.java
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/kgoodson/events/play/src/test/java/com/example/TestChanges.java')
-rw-r--r--sandbox/kgoodson/events/play/src/test/java/com/example/TestChanges.java41
1 files changed, 41 insertions, 0 deletions
diff --git a/sandbox/kgoodson/events/play/src/test/java/com/example/TestChanges.java b/sandbox/kgoodson/events/play/src/test/java/com/example/TestChanges.java
new file mode 100644
index 0000000000..09aec7f046
--- /dev/null
+++ b/sandbox/kgoodson/events/play/src/test/java/com/example/TestChanges.java
@@ -0,0 +1,41 @@
+package com.example;
+
+
+import java.io.InputStream;
+import java.net.URL;
+
+import org.apache.tuscany.sdo.api.SDOUtil;
+import junit.framework.TestCase;
+
+
+import com.example.ComExampleObserver;
+
+import commonj.sdo.DataObject;
+import commonj.sdo.helper.HelperContext;
+
+public class TestChanges extends TestCase {
+
+ HelperContext scope;
+ private final String TEST_MODEL = "/simple.xsd";
+
+
+ public void setUp() throws Exception {
+ scope = SDOUtil.createHelperContext();
+ URL url = getClass().getResource(TEST_MODEL);
+ InputStream inputStream = url.openStream();
+ scope.getXSDHelper().define(inputStream, url.toString());
+ inputStream.close();
+
+ }
+
+ public void tearDown() throws Exception {
+ }
+
+ public void testChange1()
+ {
+ DataObject quote = scope.getDataFactory().create("http://www.example.com/simple", "Quote");
+ SDOUtil.addChangeListener(quote, new ComExampleObserver());
+
+ quote.setString("symbol","foo");
+ }
+}