From 939d98d62bb168856dade45a587859692048a973 Mon Sep 17 00:00:00 2001 From: slaws Date: Thu, 20 Aug 2009 11:10:01 +0000 Subject: Create monitor instance in test case as monitor.puchContext calls will fail without it. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@806122 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/assembly/builder/impl/CompositeBuilderTestCase.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'java/sca/modules') diff --git a/java/sca/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java b/java/sca/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java index 8dc627b88c..d33ad3ccef 100644 --- a/java/sca/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java +++ b/java/sca/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java @@ -29,6 +29,9 @@ import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.CompositeReference; import org.apache.tuscany.sca.assembly.CompositeService; import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory; +import org.apache.tuscany.sca.monitor.DefaultMonitorFactory; +import org.apache.tuscany.sca.monitor.Monitor; +import org.apache.tuscany.sca.monitor.MonitorFactory; import org.junit.BeforeClass; import org.junit.Test; @@ -40,10 +43,13 @@ import org.junit.Test; public class CompositeBuilderTestCase { private static AssemblyFactory assemblyFactory; + private static Monitor monitor; @BeforeClass public static void setUp() throws Exception { assemblyFactory = new DefaultAssemblyFactory(); + MonitorFactory mf = new DefaultMonitorFactory(); + monitor = mf.createMonitor(); } @Test @@ -71,7 +77,7 @@ public class CompositeBuilderTestCase { c.setName(new QName("http://foo", "C")); c.getIncludes().add(c1); - new CompositeIncludeBuilderImpl(null).build(c, null, null); + new CompositeIncludeBuilderImpl(null).build(c, null, monitor); assertTrue(c.getComponents().get(0).getName().equals("a")); assertTrue(c.getComponents().get(1).getName().equals("b")); @@ -114,7 +120,7 @@ public class CompositeBuilderTestCase { z.setImplementation(c1); c.getComponents().add(z); - new CompositeCloneBuilderImpl().build(c, null, null); + new CompositeCloneBuilderImpl().build(c, null, monitor); assertTrue(c.getComponents().get(0).getImplementation() != c1); assertTrue(c.getComponents().get(1).getImplementation() != c2); -- cgit v1.2.3