Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2891 - in development/main/test: . components/http components/http/demo components/http/demo/src/main/net/dpml/http components/http/demo/src/test components/http/demo/src/test/net components/http/demo/src/test/net/dpml components/http/demo/src/test/net/dpml/http components/http/impl/src/main/net/dpml/http/impl

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2891 - in development/main/test: . components/http components/http/demo components/http/demo/src/main/net/dpml/http components/http/demo/src/test components/http/demo/src/test/net components/http/demo/src/test/net/dpml components/http/demo/src/test/net/dpml/http components/http/impl/src/main/net/dpml/http/impl
  • Date: Sat, 18 Jun 2005 00:26:30 -0400

Author: mcconnell AT dpml.net
Date: Sat Jun 18 00:26:30 2005
New Revision: 2891

Added:
development/main/test/components/http/demo/src/test/
development/main/test/components/http/demo/src/test/net/
development/main/test/components/http/demo/src/test/net/dpml/
development/main/test/components/http/demo/src/test/net/dpml/http/

development/main/test/components/http/demo/src/test/net/dpml/http/HttpTestCase.java
development/main/test/module.properties
Modified:
development/main/test/components/http/demo/build.xml
development/main/test/components/http/demo/src/main/net/dpml/http/Demo.java

development/main/test/components/http/impl/src/main/net/dpml/http/impl/HttpContextImpl.java

development/main/test/components/http/impl/src/main/net/dpml/http/impl/HttpServerImpl.java
development/main/test/components/http/index.xml
Log:
updating to FT

Modified: development/main/test/components/http/demo/build.xml
==============================================================================
--- development/main/test/components/http/demo/build.xml (original)
+++ development/main/test/components/http/demo/build.xml Sat Jun 18
00:26:30 2005
@@ -29,7 +29,8 @@

<component xmlns="plugin:dpml/composition/dpml-composition-builder"
type="net.dpml.http.Demo"
- name="demo">
+ name="demo"
+ dest="target/test/demo.part" >
<parts>
<component type="net.dpml.http.impl.HttpServerImpl" name="server">
<context>

Modified:
development/main/test/components/http/demo/src/main/net/dpml/http/Demo.java
==============================================================================
---
development/main/test/components/http/demo/src/main/net/dpml/http/Demo.java
(original)
+++
development/main/test/components/http/demo/src/main/net/dpml/http/Demo.java
Sat Jun 18 00:26:30 2005
@@ -17,24 +17,38 @@

import net.dpml.logging.Logger;

+import net.dpml.activity.Startable;
+
import net.dpml.http.impl.*;
+import net.dpml.http.HttpService;
+import net.dpml.http.HttpContextService;
+
+import net.dpml.part.model.Provider;
+
+import org.mortbay.http.HttpHandler;

public class Demo
{
public interface Parts
{
- HttpServerImpl getServer();
- NotFoundHandler getNotFoundHandler();
- HttpContextImpl getContext();
+ Provider getServerProvider();
+ Provider getNotFoundHandlerProvider();
+ Provider getContextProvider();
}

private Logger m_logger;
private Parts m_parts;

- public void Demo( Logger logger, Parts parts )
+ public Demo( Logger logger, Parts parts )
{
m_logger = logger;
m_parts = parts;
}
+
+ public void start() throws Exception
+ {
+ Object server = m_parts.getServerProvider().resolve( false );
+ m_logger.info( "Started: " + server );
+ }
}


Added:
development/main/test/components/http/demo/src/test/net/dpml/http/HttpTestCase.java
==============================================================================
--- (empty file)
+++
development/main/test/components/http/demo/src/test/net/dpml/http/HttpTestCase.java
Sat Jun 18 00:26:30 2005
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2004 Stephen J. McConnell.
+ * Copyright 1999-2004 The Apache Software Foundation
+ *
+ * Licensed 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 net.dpml.http;
+
+import java.net.URI;
+
+import junit.framework.TestCase;
+
+import net.dpml.part.model.Model;
+import net.dpml.part.control.Controller;
+import net.dpml.part.control.Manager;
+
+import net.dpml.composition.unit.CompositionHelper;
+
+/**
+ * Test a simple component case.
+ *
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @version $Id: AbstractDescriptorTestCase.java 1556 2005-01-22 12:43:42Z
niclas $
+ */
+public class HttpTestCase extends TestCase
+{
+ private static final String PATH = "demo.part";
+
+ /**
+ * Test the construction of the widget implementation and invocation
+ * of a non-service public method on the implementation class.
+ */
+ public void testHttp() throws Exception
+ {
+ String id = "steve";
+ CompositionHelper helper = new CompositionHelper();
+ URI uri = helper.toURI( PATH );
+ Model model = helper.getCompositionManager().getModel( uri, "demo" );
+ Demo demo = (Demo) model.getProvider().resolve( false );
+ demo.start();
+ }
+}

Modified:
development/main/test/components/http/impl/src/main/net/dpml/http/impl/HttpContextImpl.java
==============================================================================
---
development/main/test/components/http/impl/src/main/net/dpml/http/impl/HttpContextImpl.java
(original)
+++
development/main/test/components/http/impl/src/main/net/dpml/http/impl/HttpContextImpl.java
Sat Jun 18 00:26:30 2005
@@ -39,11 +39,6 @@
import org.mortbay.http.RequestLog;
import org.mortbay.http.UserRealm;

-/** Wrapper for the Jetty HttpContext.
- *
- * @metro.component name="http-context" lifestyle="singleton"
- * @metro.service type="net.dpml.http.HttpContextService"
- */
public class HttpContextImpl extends HttpContext
implements Startable, Disposable, HttpContextService
{

Modified:
development/main/test/components/http/impl/src/main/net/dpml/http/impl/HttpServerImpl.java
==============================================================================
---
development/main/test/components/http/impl/src/main/net/dpml/http/impl/HttpServerImpl.java
(original)
+++
development/main/test/components/http/impl/src/main/net/dpml/http/impl/HttpServerImpl.java
Sat Jun 18 00:26:30 2005
@@ -23,11 +23,6 @@
import org.mortbay.jetty.Server;
import org.mortbay.util.MultiException;

-/** Wrapper for the Jetty HttpServer
- *
- * @metro.component name="http-server" lifestyle="singleton"
- * @metro.service type="net.dpml.http.HttpService"
- */
public class HttpServerImpl extends Server
implements Startable, Disposable, HttpService
{

Modified: development/main/test/components/http/index.xml
==============================================================================
--- development/main/test/components/http/index.xml (original)
+++ development/main/test/components/http/index.xml Sat Jun 18 00:26:30
2005
@@ -52,6 +52,7 @@
<status>SNAPSHOT</status>
</info>
<dependencies>
+ <include key="dpml-transit-main"/>
<include key="dpml-activity-api"/>
<include key="dpml-logging-api"/>
<include key="dpml-configuration-api"/>
@@ -62,12 +63,10 @@
<include key="org.mortbay.jetty"/>
<include key="org.mortbay.jaas"/>
<include key="servletapi" runtime="true" build="true" />
- <include key="commons-logging" build="false" runtime="true"/>
<include key="jsp-api" runtime="true" build="false" />
<include key="jasper-runtime" runtime="true" build="false" />
<include key="jasper-compiler" runtime="true" build="false" />
<include key="xercesImpl" runtime="true" build="false" />
- <include key="dpml-transit-main"/>
</dependencies>
<plugins>
<include key="dpml-composition-builder" runtime="false"/>
@@ -83,6 +82,9 @@
</info>
<dependencies>
<include key="dpml-http-impl"/>
+ <include key="dpml-part-api"/>
+ <include key="dpml-depot-console"/>
+ <include key="dpml-composition-control"/>
</dependencies>
<plugins>
<include key="dpml-composition-builder" runtime="false"/>
@@ -100,6 +102,7 @@
</info>
<dependencies>
<include key="servletapi" />
+ <include key="commons-logging" runtime="true"/>
</dependencies>
</resource>

@@ -148,4 +151,12 @@
</info>
</resource>

+ <resource>
+ <info>
+ <name>commons-logging</name>
+ <version>1.0.4</version>
+ <group>commons-logging</group>
+ </info>
+ </resource>
+
</index>

Added: development/main/test/module.properties
==============================================================================
--- (empty file)
+++ development/main/test/module.properties Sat Jun 18 00:26:30 2005
@@ -0,0 +1,2 @@
+
+project.test.fork = true



  • svn commit: r2891 - in development/main/test: . components/http components/http/demo components/http/demo/src/main/net/dpml/http components/http/demo/src/test components/http/demo/src/test/net components/http/demo/src/test/net/dpml components/http/demo/src/test/net/dpml/http components/http/impl/src/main/net/dpml/http/impl, mcconnell, 06/18/2005

Archive powered by MHonArc 2.6.24.

Top of Page