You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sv...@apache.org on 2006/11/17 19:58:09 UTC
svn commit: r476254 -
/incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/model/CompositeComponentTypeTestCase.java
Author: svkrish
Date: Fri Nov 17 10:58:09 2006
New Revision: 476254
URL: http://svn.apache.org/viewvc?view=rev&rev=476254
Log:
Fixed for JIRA TUSCANY-921
Added:
incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/model/CompositeComponentTypeTestCase.java
Added: incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/model/CompositeComponentTypeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/model/CompositeComponentTypeTestCase.java?view=auto&rev=476254
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/model/CompositeComponentTypeTestCase.java (added)
+++ incubator/tuscany/java/sca/kernel/spi/src/test/java/org/apache/tuscany/spi/model/CompositeComponentTypeTestCase.java Fri Nov 17 10:58:09 2006
@@ -0,0 +1,43 @@
+/*
+ * 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.spi.model;
+
+import junit.framework.TestCase;
+
+public class CompositeComponentTypeTestCase extends TestCase {
+
+ public void testWireCreationAndRetrieval() throws Exception {
+ WireDefinition wire1 = new WireDefinition();
+ WireDefinition wire2 = new WireDefinition();
+
+ CompositeComponentType composite = new CompositeComponentType();
+ CompositeComponentType includedComposite = new CompositeComponentType();
+ includedComposite.add(wire1);
+ Include compositeInclude = new Include();
+ compositeInclude.setIncluded(includedComposite);
+
+ composite.add(compositeInclude);
+ composite.add(wire1);
+
+ assertEquals(1, composite.getDeclaredWires().size());
+ assertEquals(wire1, composite.getDeclaredWires().get(0));
+ assertEquals(2, composite.getWires().size());
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org