Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2124 - in development/main/metro/composition: api builder control testing testing/acme testing/acme/src testing/src testing/system testing/system/src testing/system/src/test testing/system/src/test/net testing/system/src/test/net/dpml testing/system/src/test/net/dpml/composition testing/system/src/test/net/dpml/composition/testing

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: r2124 - in development/main/metro/composition: api builder control testing testing/acme testing/acme/src testing/src testing/system testing/system/src testing/system/src/test testing/system/src/test/net testing/system/src/test/net/dpml testing/system/src/test/net/dpml/composition testing/system/src/test/net/dpml/composition/testing
  • Date: Thu, 24 Mar 2005 14:07:48 -0500

Author: mcconnell AT dpml.net
Date: Thu Mar 24 14:07:48 2005
New Revision: 2124

Added:
development/main/metro/composition/testing/acme/build.xml
- copied, changed from r2122,
development/main/metro/composition/testing/build.xml
development/main/metro/composition/testing/acme/src/
- copied from r2122, development/main/metro/composition/testing/src/
development/main/metro/composition/testing/system/ (props changed)
development/main/metro/composition/testing/system/build.xml
development/main/metro/composition/testing/system/src/
development/main/metro/composition/testing/system/src/test/
development/main/metro/composition/testing/system/src/test/net/
development/main/metro/composition/testing/system/src/test/net/dpml/

development/main/metro/composition/testing/system/src/test/net/dpml/composition/

development/main/metro/composition/testing/system/src/test/net/dpml/composition/testing/

development/main/metro/composition/testing/system/src/test/net/dpml/composition/testing/CompositionManagerTestCase.java
Removed:
development/main/metro/composition/testing/build.xml
development/main/metro/composition/testing/src/
Modified:
development/main/metro/composition/api/build.xml
development/main/metro/composition/builder/ (props changed)
development/main/metro/composition/builder/build.xml
development/main/metro/composition/control/ (props changed)
development/main/metro/composition/testing/acme/ (props changed)
Log:
add initial testing framework

Modified: development/main/metro/composition/api/build.xml
==============================================================================
--- development/main/metro/composition/api/build.xml (original)
+++ development/main/metro/composition/api/build.xml Thu Mar 24 14:07:48
2005
@@ -6,7 +6,7 @@
<transit:import uri="artifact:template:dpml/magic/standard"/>

<target name="init" depends="standard.init">
- <x:property key="dpml-composition-impl" feature="uri" type="plugin"
name="control.plugin"/>
+ <x:property key="dpml-composition-control" feature="uri" type="plugin"
name="control.plugin"/>
<x:property key="dpml-composition-builder" feature="uri" type="plugin"
name="builder.plugin"/>
<filter token="PART-BUILDER-URI" value="${builder.plugin}"/>
<filter token="PART-HANDLER-URI" value="${control.plugin}"/>

Modified: development/main/metro/composition/builder/build.xml
==============================================================================
--- development/main/metro/composition/builder/build.xml (original)
+++ development/main/metro/composition/builder/build.xml Thu Mar 24
14:07:48 2005
@@ -6,8 +6,8 @@
<transit:import uri="artifact:template:dpml/magic/standard"/>

<target name="init" depends="standard.init">
- <x:property key="dpml-composition-impl" feature="uri" type="plugin"
name="control.plugin"/>
<x:property feature="uri" type="plugin" name="builder.plugin"/>
+ <x:property key="dpml-composition-control" feature="uri" type="plugin"
name="control.plugin"/>
<filter token="PART-BUILDER-URI" value="${builder.plugin}"/>
<filter token="TYPE-BUILDER-URI" value="${builder.plugin}"/>
<filter token="PART-HANDLER-URI" value="${control.plugin}"/>

Copied: development/main/metro/composition/testing/acme/build.xml (from
r2122, development/main/metro/composition/testing/build.xml)
==============================================================================
--- development/main/metro/composition/testing/build.xml (original)
+++ development/main/metro/composition/testing/acme/build.xml Thu Mar 24
14:07:48 2005
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>

-<project name="dpml-composition-testing" default="install" basedir="."
+<project name="dpml-composition-testing-acme" default="install" basedir="."
xmlns:transit="antlib:net.dpml.transit"
xmlns:x="plugin:dpml/magic/dpml-magic-core">

<transit:import uri="artifact:template:dpml/magic/standard"/>

Added: development/main/metro/composition/testing/system/build.xml
==============================================================================
--- (empty file)
+++ development/main/metro/composition/testing/system/build.xml Thu Mar 24
14:07:48 2005
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project name="dpml-composition-testing-system" default="install" basedir="."
+ xmlns:transit="antlib:net.dpml.transit"
xmlns:x="plugin:dpml/magic/dpml-magic-core">
+
+ <transit:import uri="artifact:template:dpml/magic/standard"/>
+
+ <target name="init" depends="standard.init">
+ <x:property key="dpml-composition-testing-acme" feature="uri"
type="part" name="acme.part"/>
+ <filter token="ACME-PART-URI" value="${acme.part}"/>
+ </target>
+
+</project>

Added:
development/main/metro/composition/testing/system/src/test/net/dpml/composition/testing/CompositionManagerTestCase.java
==============================================================================
--- (empty file)
+++
development/main/metro/composition/testing/system/src/test/net/dpml/composition/testing/CompositionManagerTestCase.java
Thu Mar 24 14:07:48 2005
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2005 Stephen J. McConnell
+ *
+ * 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.composition.testing;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URI;
+
+import net.dpml.control.Model;
+
+import net.dpml.composition.control.CompositionManager;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Kernel testcase.
+ *
+ * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
+ * @version $Revision: 1.2 $ $Date: 2004/03/17 10:30:09 $
+ */
+public class CompositionManagerTestCase extends TestCase
+{
+ //--------------------------------------------------------------------
+ // state
+ //--------------------------------------------------------------------
+
+ private CompositionManager m_manager;
+ private Model m_model;
+
+ //--------------------------------------------------------------------
+ // TestCase
+ //--------------------------------------------------------------------
+
+ public void setUp() throws Exception
+ {
+ m_manager = new CompositionManager();
+ m_model = m_manager.addPart( ACME_PART_URI );
+ System.out.println( "#model: " + m_model );
+ }
+
+ public void testSetName() throws Exception
+ {
+ String name = "demo";
+ m_model.setName( name );
+ assertEquals( "name", name, m_model.getName() );
+ }
+
+ //--------------------------------------------------------------------
+ // static utilities for testcase
+ //--------------------------------------------------------------------
+
+ static
+ {
+ System.setProperty( "java.protocol.handler.pkgs", "net.dpml.transit"
);
+ }
+
+ private static final URI ACME_PART_URI = createStaticURI(
"@ACME-PART-URI@" );
+
+ private static URI createStaticURI( String path )
+ {
+ try
+ {
+ return new URI( path );
+ }
+ catch( Throwable e )
+ {
+ return null;
+ }
+ }
+}



  • svn commit: r2124 - in development/main/metro/composition: api builder control testing testing/acme testing/acme/src testing/src testing/system testing/system/src testing/system/src/test testing/system/src/test/net testing/system/src/test/net/dpml testing/system/src/test/net/dpml/composition testing/system/src/test/net/dpml/composition/testing, mcconnell, 03/24/2005

Archive powered by MHonArc 2.6.24.

Top of Page