You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ke...@apache.org on 2006/12/04 13:24:40 UTC
svn commit: r482153 -
/incubator/tuscany/sandbox/kgoodson/moreTests/src/test/java/org/apache/tuscany/sdo/test/XMLSaveMakesDataGraphGoTestCase.java
Author: kelvingoodson
Date: Mon Dec 4 04:24:39 2006
New Revision: 482153
URL: http://svn.apache.org/viewvc?view=rev&rev=482153
Log:
capturing another issue i'm half way through investigating
Added:
incubator/tuscany/sandbox/kgoodson/moreTests/src/test/java/org/apache/tuscany/sdo/test/XMLSaveMakesDataGraphGoTestCase.java (with props)
Added: incubator/tuscany/sandbox/kgoodson/moreTests/src/test/java/org/apache/tuscany/sdo/test/XMLSaveMakesDataGraphGoTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/kgoodson/moreTests/src/test/java/org/apache/tuscany/sdo/test/XMLSaveMakesDataGraphGoTestCase.java?view=auto&rev=482153
==============================================================================
--- incubator/tuscany/sandbox/kgoodson/moreTests/src/test/java/org/apache/tuscany/sdo/test/XMLSaveMakesDataGraphGoTestCase.java (added)
+++ incubator/tuscany/sandbox/kgoodson/moreTests/src/test/java/org/apache/tuscany/sdo/test/XMLSaveMakesDataGraphGoTestCase.java Mon Dec 4 04:24:39 2006
@@ -0,0 +1,76 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sdo.test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sdo.util.SDOUtil;
+
+import commonj.sdo.DataGraph;
+import commonj.sdo.DataObject;
+import commonj.sdo.Type;
+import commonj.sdo.helper.HelperContext;
+import commonj.sdo.helper.TypeHelper;
+import commonj.sdo.helper.XMLHelper;
+import commonj.sdo.helper.XSDHelper;
+
+public class XMLSaveMakesDataGraphGoTestCase extends TestCase {
+
+
+ private HelperContext hc;
+ private TypeHelper th;
+ private XSDHelper xsdh;
+ private XMLHelper xmlh;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ hc = SDOUtil.createHelperContext();
+ th = hc.getTypeHelper();
+ xsdh = hc.getXSDHelper();
+ xmlh = hc.getXMLHelper();
+
+ URL url = getClass().getResource("/company.xsd");
+ InputStream inputStream = url.openStream();
+ xsdh.define(inputStream, url.toString());
+ inputStream.close();
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void test1() throws IOException {
+ DataGraph dg = SDOUtil.createDataGraph();
+ Type rootType = th.getType("company.xsd", "CompanyType");
+ DataObject graph = dg.createRootObject(rootType);
+
+ graph.setString("name", "ACME");
+ assertEquals(dg, graph.getDataGraph());
+ xmlh.save(graph, "company.xsd", "company", System.out);
+ assertEquals(dg, graph.getDataGraph()); // DataGraph has become null
+ }
+
+}
Propchange: incubator/tuscany/sandbox/kgoodson/moreTests/src/test/java/org/apache/tuscany/sdo/test/XMLSaveMakesDataGraphGoTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/sandbox/kgoodson/moreTests/src/test/java/org/apache/tuscany/sdo/test/XMLSaveMakesDataGraphGoTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org