You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/03/14 04:02:31 UTC

svn commit: r517979 - in /incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test: java/org/apache/tuscany/assembly/reader/ReadTestCase.java resources/CalculatorComponent.constrainingType resources/CalculatorImpl.componentType

Author: jsdelfino
Date: Tue Mar 13 20:02:30 2007
New Revision: 517979

URL: http://svn.apache.org/viewvc?view=rev&rev=517979
Log:
Add test cases for constrainingType and componentType files

Added:
    incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/CalculatorComponent.constrainingType
    incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/CalculatorImpl.componentType   (with props)
Modified:
    incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ReadTestCase.java

Modified: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ReadTestCase.java?view=diff&rev=517979&r1=517978&r2=517979
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ReadTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ReadTestCase.java Tue Mar 13 20:02:30 2007
@@ -55,17 +55,17 @@
 	}
 	
 	public void testLoadComponentType() throws Exception {
-//		InputStream is = getClass().getClassLoader().getResourceAsStream("Calculator.componentType");
-//		ContentHandler handler = new CompositeHandler(factory, reader);
-//        reader.setContentHandler(handler);
-//        reader.parse(new InputSource(is));
+		InputStream is = getClass().getClassLoader().getResourceAsStream("CalculatorImpl.componentType");
+		ContentHandler handler = new ComponentTypeHandler(factory, reader);
+        reader.setContentHandler(handler);
+        reader.parse(new InputSource(is));
 	}
 	
 	public void testLoadConstrainingType() throws Exception {
-//		InputStream is = getClass().getClassLoader().getResourceAsStream("Calculator.constrainingType");
-//		ContentHandler handler = new CompositeHandler(factory, reader);
-//        reader.setContentHandler(handler);
-//        reader.parse(new InputSource(is));
+		InputStream is = getClass().getClassLoader().getResourceAsStream("CalculatorComponent.constrainingType");
+		ContentHandler handler = new ConstrainingTypeHandler(factory, reader);
+        reader.setContentHandler(handler);
+        reader.parse(new InputSource(is));
 	}
 
 	public void testLoadComposite() throws Exception {

Added: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/CalculatorComponent.constrainingType
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/CalculatorComponent.constrainingType?view=auto&rev=517979
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/CalculatorComponent.constrainingType (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/CalculatorComponent.constrainingType Tue Mar 13 20:02:30 2007
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<constrainingType xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	name="CalculatorComponent">
+
+  <service name="CalculatorService">
+        <interface.java class="calculator.CalculatorService" />
+  </service>
+
+  <reference name="divideService">
+        <interface.java class="calculator.DivideService" />
+  </reference>  
+
+</constrainingType>              
+       
\ No newline at end of file

Added: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/CalculatorImpl.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/CalculatorImpl.componentType?view=auto&rev=517979
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/CalculatorImpl.componentType (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/CalculatorImpl.componentType Tue Mar 13 20:02:30 2007
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.
+-->
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
+
+  <service name="CalculatorService">
+        <interface.java class="calculator.CalculatorService" />
+  </service>
+
+  <reference name="divideService">
+        <interface.java class="calculator.DivideService" />
+  </reference>  
+
+</componentType>              
+       
\ No newline at end of file

Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/CalculatorImpl.componentType
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/CalculatorImpl.componentType
------------------------------------------------------------------------------
    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