From 719fe27e65588eeb2e4d34f349162d54a0b6bf92 Mon Sep 17 00:00:00 2001 From: slaws Date: Tue, 23 Jun 2009 09:37:01 +0000 Subject: TUSCANY-3097 Add test to see if the application composites of modules inside an EAR are processed (they shouldn't be) git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@787603 13f79535-47bb-0310-9956-ffa450edef68 --- .../pom.xml | 103 +++++++++++++++++ .../application/META-INF/application.composite | 48 ++++++++ .../src/main/resources/isthisignored.composite | 49 ++++++++ .../src/main/resources/META-INF/openejb-jar.xml | 2 +- .../src/main/resources/isthisignored.composite | 49 ++++++++ .../itest/contribution-jee-samples/pom.xml | 2 + .../scajar-ear-appcomp-war-appcomp/pom.xml | 72 ++++++++++++ .../main/java/sample/ejb3/HelloworldService.java | 33 ++++++ .../java/sample/java/HelloworldServiceJava.java | 28 +++++ .../main/java/sample/pojo/HelloworldClient2.java | 25 +++++ .../java/sample/pojo/HelloworldClient2Impl.java | 39 +++++++ .../java/sample/pojo/HelloworldTargetImpl.java | 29 +++++ .../src/main/resources/helloworld.composite | 40 +++++++ .../jee/TestExternalEarModelResolver.java | 2 + .../jee/SCAJarEarAppcompWarAppcompTestCase.java | 125 +++++++++++++++++++++ 15 files changed, 645 insertions(+), 1 deletion(-) create mode 100644 branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/pom.xml create mode 100644 branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/src/main/application/META-INF/application.composite create mode 100644 branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/resources/isthisignored.composite create mode 100644 branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/resources/isthisignored.composite create mode 100644 branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/pom.xml create mode 100644 branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/ejb3/HelloworldService.java create mode 100644 branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/java/HelloworldServiceJava.java create mode 100644 branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2.java create mode 100644 branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2Impl.java create mode 100644 branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldTargetImpl.java create mode 100644 branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/resources/helloworld.composite create mode 100644 branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompWarAppcompTestCase.java diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/pom.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/pom.xml new file mode 100644 index 0000000000..74687aedbf --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/pom.xml @@ -0,0 +1,103 @@ + + + + + 4.0.0 + + org.apache.tuscany.sca + itest-contribution-jee-samples + 1.6-SNAPSHOT + ../pom.xml + + + itest-contribution-jee-samples-30-ear-appcomp-contrib-implicit-war-appcomp + Apache Tuscany SCA iTest Contribution Java EE Samples 30 + ear + + + + org.apache.tuscany.sca + tuscany-sca-api + 1.6-SNAPSHOT + provided + + + + org.apache.geronimo.specs + geronimo-ejb_3.0_spec + 1.0 + provided + + + + org.apache.tuscany.sca + itest-contribution-jee-samples-00-jar-shared + 1.6-SNAPSHOT + provided + + + + org.apache.tuscany.sca + itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit + 1.6-SNAPSHOT + ejb + provided + + + + org.apache.tuscany.sca + itest-contribution-jee-samples-06-war-appcomp-contrib-implicit + 1.6-SNAPSHOT + war + provided + + + + + + + + org.apache.maven.plugins + maven-ear-plugin + + + + org.apache.tuscany.sca + itest-contribution-jee-samples-00-jar-shared + true + / + + + org.apache.tuscany.sca + itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit + / + + + org.apache.tuscany.sca + itest-contribution-jee-samples-06-war-appcomp-contrib-implicit + / + + + + + + ${artifactId} + + diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/src/main/application/META-INF/application.composite b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/src/main/application/META-INF/application.composite new file mode 100644 index 0000000000..3b1555f567 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/src/main/application/META-INF/application.composite @@ -0,0 +1,48 @@ + + + + + + + + + + + + EJB + + + + + + + + + Java + + + + + + + diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/resources/isthisignored.composite b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/resources/isthisignored.composite new file mode 100644 index 0000000000..90872041b0 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/resources/isthisignored.composite @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/resources/META-INF/openejb-jar.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/resources/META-INF/openejb-jar.xml index 7428735903..9a97cbd535 100644 --- a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/resources/META-INF/openejb-jar.xml +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-implicit/src/main/resources/META-INF/openejb-jar.xml @@ -21,7 +21,7 @@ test - itest-contribution-jee-samples-7-ejb-nonenhanced + itest-contribution-jee-samples-12-ejb-appcomp-contrib-implicit 1.0 jar diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/resources/isthisignored.composite b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/resources/isthisignored.composite new file mode 100644 index 0000000000..90872041b0 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/resources/isthisignored.composite @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/pom.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/pom.xml index bb7194c6ba..62f44f9aef 100644 --- a/branches/sca-java-1.x/itest/contribution-jee-samples/pom.xml +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/pom.xml @@ -47,8 +47,10 @@ ejb-appcomp-contrib-implicit ear-nonenhanced ear-appcomp-contrib-implicit + ear-appcomp-contrib-implicit-war-appcomp scajar-ear-nonenhanced scajar-ear-appcomp + scajar-ear-appcomp-war-appcomp scazip-ejb-appcomp scazip-war-appcomp diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/pom.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/pom.xml new file mode 100644 index 0000000000..7852f46dd3 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/pom.xml @@ -0,0 +1,72 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.6-SNAPSHOT + ../../pom.xml + + itest-contribution-jee-samples-43-scajar-ear-appcomp-war-appcomp + Apache Tuscany SCA iTest Contribution Java EE Samples 43 + + + + apache.incubator + http://people.apache.org/repo/m2-incubating-repository + + + + + + org.apache.tuscany.sca + tuscany-sca-api + 1.6-SNAPSHOT + provided + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.geronimo.specs + geronimo-ejb_3.0_spec + 1.0 + provided + + + + junit + junit + 4.5 + test + + + + + + ${artifactId} + + diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/ejb3/HelloworldService.java b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/ejb3/HelloworldService.java new file mode 100644 index 0000000000..0194d1870c --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/ejb3/HelloworldService.java @@ -0,0 +1,33 @@ +/* + * 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 sample.ejb3; + +import javax.ejb.Remote; + +/** + * HelloworldService EJB interface. + * + * @version $Rev$ $Date$ + */ + +@Remote +public interface HelloworldService { + String getGreetings(String name); +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/java/HelloworldServiceJava.java b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/java/HelloworldServiceJava.java new file mode 100644 index 0000000000..1fad282a75 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/java/HelloworldServiceJava.java @@ -0,0 +1,28 @@ +/* + * 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 sample.java; + +import org.osoa.sca.annotations.Remotable; + + +@Remotable +public interface HelloworldServiceJava { + String getGreetings(String name); +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2.java b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2.java new file mode 100644 index 0000000000..8adb6a5995 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2.java @@ -0,0 +1,25 @@ +/* + * 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 sample.pojo; + +public interface HelloworldClient2 { + + String getGreetings(String name); + +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2Impl.java b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2Impl.java new file mode 100644 index 0000000000..ae16263505 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldClient2Impl.java @@ -0,0 +1,39 @@ +/* + * 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 sample.pojo; + +import org.osoa.sca.annotations.Reference; + +import sample.ejb3.HelloworldService; +import sample.java.HelloworldServiceJava; + +public class HelloworldClient2Impl implements HelloworldClient2 { + + @Reference + protected HelloworldService hwService; + + @Reference + protected HelloworldServiceJava hwJavaService; + + public String getGreetings(String name){ + //return hwService.getGreetings(name) + hwJavaService.getGreetings(name); + return hwJavaService.getGreetings(name); + } + +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldTargetImpl.java b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldTargetImpl.java new file mode 100644 index 0000000000..05885cead7 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/java/sample/pojo/HelloworldTargetImpl.java @@ -0,0 +1,29 @@ +/* + * 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 sample.pojo; + +import sample.java.HelloworldServiceJava; + +public class HelloworldTargetImpl implements HelloworldServiceJava { + + public String getGreetings(String name){ + return "Hello " + name; + } + +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/resources/helloworld.composite b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/resources/helloworld.composite new file mode 100644 index 0000000000..e9346fb2bb --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp-war-appcomp/src/main/resources/helloworld.composite @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/branches/sca-java-1.x/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestExternalEarModelResolver.java b/branches/sca-java-1.x/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestExternalEarModelResolver.java index eda6aad177..34bf3702d3 100644 --- a/branches/sca-java-1.x/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestExternalEarModelResolver.java +++ b/branches/sca-java-1.x/itest/contribution-jee/src/main/java/org/apache/tuscany/sca/test/contribution/jee/TestExternalEarModelResolver.java @@ -93,6 +93,8 @@ public class TestExternalEarModelResolver implements ModelResolver { earLocation = new File("../contribution-jee-samples/ear-nonenhanced/target/itest-contribution-jee-samples-13-ear-nonenhanced.ear").toURL(); } else if ( uri.toString().equals("itest-contribution-jee-samples-29-ear-appcomp-contrib-implicit.ear")){ earLocation = new File("../contribution-jee-samples/ear-appcomp-contrib-implicit/target/itest-contribution-jee-samples-29-ear-appcomp-contrib-implicit.ear").toURL(); + } else if ( uri.toString().equals("itest-contribution-jee-samples-30-ear-appcomp-contrib-implicit-war-appcomp.ear")){ + earLocation = new File("../contribution-jee-samples/ear-appcomp-contrib-implicit-war-appcomp/target/itest-contribution-jee-samples-30-ear-appcomp-contrib-implicit-war-appcomp.ear").toURL(); } else { return unresolved; } diff --git a/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompWarAppcompTestCase.java b/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompWarAppcompTestCase.java new file mode 100644 index 0000000000..9f50ea573c --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompWarAppcompTestCase.java @@ -0,0 +1,125 @@ +/* + * 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.sca.test.contribution.jee; + +import java.io.File; +import java.net.URL; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import junit.framework.Assert; + +import org.apache.tuscany.sca.assembly.Component; +import org.apache.tuscany.sca.assembly.Composite; +import org.apache.tuscany.sca.assembly.Reference; +import org.apache.tuscany.sca.assembly.Service; +import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; +import org.apache.tuscany.sca.contribution.Artifact; +import org.apache.tuscany.sca.contribution.Contribution; +import org.apache.tuscany.sca.contribution.jee.ExternalEarInfo; +import org.apache.tuscany.sca.contribution.jee.JavaEEApplicationInfo; +import org.apache.tuscany.sca.contribution.jee.JavaEEIntrospector; +import org.apache.tuscany.sca.contribution.jee.impl.JavaEEApplicationInfoImpl; +import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver; +import org.apache.tuscany.sca.contribution.resolver.ModelResolver; +import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint; +import org.apache.tuscany.sca.contribution.service.ContributionService; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.host.embedded.impl.EmbeddedSCADomain; +import org.apache.tuscany.sca.implementation.ejb.EJBImplementation; +import org.apache.tuscany.sca.implementation.jee.JEEImplementation; +import org.apache.tuscany.sca.implementation.web.WebImplementation; +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; + +import sample.pojo.HelloworldClient2; + + +public class SCAJarEarAppcompWarAppcompTestCase { + + private static final String CONTRIBUTION_001_ID = "contribution001/"; + + private ClassLoader cl; + private EmbeddedSCADomain domain; + private ContributionService contributionService; + + @Before + public void setUp() throws Exception { + //Create a test embedded SCA domain + cl = getClass().getClassLoader(); + domain = new EmbeddedSCADomain(cl, "http://localhost"); + + //Start the domain + domain.start(); + + //get a reference to the contribution service + contributionService = domain.getContributionService(); + } + + /** + * SCAJAR - It's an SCA contribution in a JAR with no nested archives + * but which references a... + * EAR - It's an JEE EAR file + * appcomp - It has an application composite in it + * WAR - It has a WAR (and and EAR) in it + * appcomp - It has an application composite in it which should be ignored + */ + @Test + public void testSCAJarEarAppcomp() throws Exception { + + URL contributionLocation = new File("../contribution-jee-samples/scajar-ear-appcomp-war-appcomp/target/itest-contribution-jee-samples-43-scajar-ear-appcomp-war-appcomp.jar").toURL(); + Contribution contribution = contributionService.contribute(CONTRIBUTION_001_ID, contributionLocation, false); + + Assert.assertNotNull(contribution); + + Composite composite = null; + for (Artifact artifact : contribution.getArtifacts()){ + if (artifact.getModel() instanceof Composite){ + composite = (Composite) artifact.getModel(); + } + } + + Assert.assertNotNull(composite); + + domain.getDomainComposite().getIncludes().add(composite); + + Assert.assertEquals(3, composite.getComponents().size()); + Assert.assertEquals(2, composite.getComponents().get(1).getImplementation().getServices().size()); + Assert.assertEquals("TheService", composite.getComponents().get(1).getImplementation().getServices().get(0).getName()); + + domain.buildComposite(composite); + + // assert that the build process has worked + Assert.assertNotNull(composite); + + domain.getCompositeActivator().activate(composite); + domain.getCompositeActivator().start(composite); + + HelloworldClient2 client = domain.getService(HelloworldClient2.class, "HelloworldClientComponent"); + Assert.assertEquals("Hello Fred Java", client.getGreetings("Fred")); + + domain.stop(); + + } + +} -- cgit v1.2.3