You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by me...@apache.org on 2007/03/03 14:09:19 UTC
svn commit: r514153 -
/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/marshaller/JavaPhysicalChangeSetMarshallerTest.java
Author: meerajk
Date: Sat Mar 3 05:09:19 2007
New Revision: 514153
URL: http://svn.apache.org/viewvc?view=rev&rev=514153
Log:
First cut of test case, need to get this working now :)
Added:
incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/marshaller/JavaPhysicalChangeSetMarshallerTest.java (with props)
Added: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/marshaller/JavaPhysicalChangeSetMarshallerTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/marshaller/JavaPhysicalChangeSetMarshallerTest.java?view=auto&rev=514153
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/marshaller/JavaPhysicalChangeSetMarshallerTest.java (added)
+++ incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/marshaller/JavaPhysicalChangeSetMarshallerTest.java Sat Mar 3 05:09:19 2007
@@ -0,0 +1,81 @@
+/*
+ * 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.core.marshaller;
+
+import java.io.InputStream;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.core.marshaller.extensions.java.JavaPhysicalComponentDefinitionMarshaller;
+import org.apache.tuscany.core.marshaller.extensions.java.JavaPhysicalReferenceDefinitionMarshaller;
+import org.apache.tuscany.core.marshaller.extensions.java.JavaPhysicalServiceDefinitionMarshaller;
+import org.apache.tuscany.spi.marshaller.ModelMarshallerRegistry;
+import org.apache.tuscany.spi.model.physical.PhysicalChangeSet;
+
+/**
+ * Test case for Java physical change set marshaller.
+ *
+ * @version $Revision$ $Date$
+ *
+ */
+public class JavaPhysicalChangeSetMarshallerTest extends TestCase {
+
+ private ModelMarshallerRegistry registry;
+
+ public JavaPhysicalChangeSetMarshallerTest(String arg0) {
+ super(arg0);
+ }
+
+ public void setUp() {
+
+ registry = new DefaultModelMarshallerRegistry();
+
+ AbstractMarshallerExtension<?>[] marshallers = new AbstractMarshallerExtension<?>[6];
+
+ for(int i = 0;i < 6; i++) {
+ marshallers[i] = new JavaPhysicalComponentDefinitionMarshaller();
+ marshallers[i] = new JavaPhysicalServiceDefinitionMarshaller();
+ marshallers[i] = new JavaPhysicalReferenceDefinitionMarshaller();
+ marshallers[i] = new PhysicalOperationDefinitionMarshaller();
+ marshallers[i] = new PhysicalWireDefinitionMarshaller();
+ marshallers[i] = new PhysicalChangeSetMarshaller();
+ }
+
+ for(int i = 0;i < 6; i++) {
+ marshallers[i].setRegistry(registry);
+ }
+
+ }
+
+ public void testUnmarshall() throws Exception {
+
+ ClassLoader cl = getClass().getClassLoader();
+ InputStream inputStream = cl.getResourceAsStream("marshall/javaChangeSet.xml");
+ XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(inputStream);
+
+ //PhysicalChangeSet changeSet = (PhysicalChangeSet) registry.unmarshall(reader);
+ //assertNotNull(changeSet);
+
+
+ }
+
+}
Propchange: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/marshaller/JavaPhysicalChangeSetMarshallerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/kernel/core/src/test/java/org/apache/tuscany/core/marshaller/JavaPhysicalChangeSetMarshallerTest.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