Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2901 - in development/main: metro/composition/control/src/main/net/dpml/composition/unit metro/main/src/main/net/dpml/metro/model test/unit test/unit/plus/src/test/net/dpml/test/acme/plus test/unit/simple/src/test/net/dpml/test/acme

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: r2901 - in development/main: metro/composition/control/src/main/net/dpml/composition/unit metro/main/src/main/net/dpml/metro/model test/unit test/unit/plus/src/test/net/dpml/test/acme/plus test/unit/simple/src/test/net/dpml/test/acme
  • Date: Wed, 22 Jun 2005 15:43:30 -0400

Author: mcconnell AT dpml.net
Date: Wed Jun 22 15:43:29 2005
New Revision: 2901

Removed:

development/main/metro/composition/control/src/main/net/dpml/composition/unit/
Modified:

development/main/metro/main/src/main/net/dpml/metro/model/DefaultMetroModel.java
development/main/metro/main/src/main/net/dpml/metro/model/MetroHelper.java
development/main/test/unit/index.xml

development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ConfigurationTestCase.java

development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ManagementTestCase.java

development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java

development/main/test/unit/simple/src/test/net/dpml/test/acme/CompositeTestCase.java

development/main/test/unit/simple/src/test/net/dpml/test/acme/ExampleTestCase.java

development/main/test/unit/simple/src/test/net/dpml/test/acme/SimpleTestCase.java
Log:
Updates to the testcase helper.

Modified:
development/main/metro/main/src/main/net/dpml/metro/model/DefaultMetroModel.java
==============================================================================
---
development/main/metro/main/src/main/net/dpml/metro/model/DefaultMetroModel.java
(original)
+++
development/main/metro/main/src/main/net/dpml/metro/model/DefaultMetroModel.java
Wed Jun 22 15:43:29 2005
@@ -35,7 +35,6 @@
import net.dpml.part.control.ControllerContextListener;
import net.dpml.part.control.ControllerContextEvent;

-import net.dpml.transit.home.ContentHome;
import net.dpml.transit.model.DefaultModel;
import net.dpml.transit.model.ContentModel;
import net.dpml.transit.model.DefaultContentModel;

Modified:
development/main/metro/main/src/main/net/dpml/metro/model/MetroHelper.java
==============================================================================
---
development/main/metro/main/src/main/net/dpml/metro/model/MetroHelper.java
(original)
+++
development/main/metro/main/src/main/net/dpml/metro/model/MetroHelper.java
Wed Jun 22 15:43:29 2005
@@ -21,6 +21,7 @@
import java.io.File;
import java.io.IOException;
import java.net.URI;
+import java.util.Properties;
import java.util.Hashtable;
import java.util.Map;
import java.util.prefs.Preferences;
@@ -35,6 +36,7 @@
import net.dpml.transit.repository.StandardLoader;
import net.dpml.transit.model.Logger;
import net.dpml.transit.model.ContentModel;
+import net.dpml.transit.model.DefaultContentModel;

/**
* A utility class used for the deployment of components in embedded
scenarios
@@ -44,6 +46,18 @@
*/
public class MetroHelper
{
+ //------------------------------------------------------------------
+ // static
+ //------------------------------------------------------------------
+
+ static
+ {
+ System.setProperty(
+ "java.util.logging.config.class",
+ System.getProperty(
+ "java.util.logging.config.class",
+ "net.dpml.transit.util.ConfigurationHandler" ) );
+ }

//------------------------------------------------------------------
// state
@@ -58,8 +72,19 @@

public MetroHelper() throws Exception
{
- ContentStorageUnit store = new ContentStorageUnit( prefs, logger,
policy );
- DefaultContentModel model = new DefaultContentModel( store );
+ String title = "Metro Part Handler.";
+ String type = "part";
+ Properties properties = new Properties();
+ String dir = System.getProperty( "project.test.dir" );
+ if( null != dir )
+ {
+ properties.put( "work.dir", dir );
+ }
+ Logger logger = new LoggingAdapter( "metro" );
+ DefaultContentModel model =
+ new DefaultContentModel( logger, null, type, title, properties );
+ m_context = new DefaultMetroModel( model );
+ m_manager = new CompositionManager( m_context );
}

public MetroHelper( ContentModel model ) throws Exception

Modified: development/main/test/unit/index.xml
==============================================================================
--- development/main/test/unit/index.xml (original)
+++ development/main/test/unit/index.xml Wed Jun 22 15:43:29 2005
@@ -14,7 +14,7 @@
</info>
<dependencies>
<include key="dpml-test-simple"/>
- <include key="dpml-composition-control"/>
+ <include key="dpml-metro-main"/>
<include key="dpml-depot-console"/>
<include key="ant-junit"/>
</dependencies>
@@ -34,7 +34,7 @@
<dependencies>
<include key="dpml-test-simple"/>
<include key="dpml-test-plus"/>
- <include key="dpml-composition-control"/>
+ <include key="dpml-metro-main"/>
<include key="dpml-depot-console"/>
<include key="ant-junit"/>
</dependencies>

Modified:
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ConfigurationTestCase.java
==============================================================================
---
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ConfigurationTestCase.java
(original)
+++
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ConfigurationTestCase.java
Wed Jun 22 15:43:29 2005
@@ -29,7 +29,7 @@
import net.dpml.part.control.Controller;
import net.dpml.part.control.Manager;

-import net.dpml.composition.unit.CompositionHelper;
+import net.dpml.metro.model.MetroHelper;

/**
* Test a simple component case.
@@ -45,7 +45,7 @@
*/
public void testConfigurableContainer() throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( "configurable-container.part" );
Model model = helper.getCompositionManager().getModel( uri );
ConfigurableContainer container = (ConfigurableContainer)
model.getProvider().resolve( false );

Modified:
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ManagementTestCase.java
==============================================================================
---
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ManagementTestCase.java
(original)
+++
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/ManagementTestCase.java
Wed Jun 22 15:43:29 2005
@@ -26,7 +26,7 @@

import junit.framework.TestCase;

-import net.dpml.composition.unit.CompositionHelper;
+import net.dpml.metro.model.MetroHelper;

import net.dpml.part.control.Manager;
import net.dpml.part.model.Component;
@@ -86,7 +86,7 @@

Component getComponent( String path ) throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( path );
Model model = helper.getCompositionManager().getModel( uri );
return model.getController().getComponent( null, model, this );

Modified:
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java
==============================================================================
---
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java
(original)
+++
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java
Wed Jun 22 15:43:29 2005
@@ -32,8 +32,8 @@
import net.dpml.test.acme.Dimension;

import net.dpml.transit.Transit;
-import net.dpml.transit.home.TransitHome;
import net.dpml.transit.model.TransitModel;
+import net.dpml.transit.store.TransitHome;
import net.dpml.transit.unit.TransitStorageUnit;

/**

Modified:
development/main/test/unit/simple/src/test/net/dpml/test/acme/CompositeTestCase.java
==============================================================================
---
development/main/test/unit/simple/src/test/net/dpml/test/acme/CompositeTestCase.java
(original)
+++
development/main/test/unit/simple/src/test/net/dpml/test/acme/CompositeTestCase.java
Wed Jun 22 15:43:29 2005
@@ -30,7 +30,7 @@
import net.dpml.part.control.Controller;
import net.dpml.part.control.Manager;

-import net.dpml.composition.unit.CompositionHelper;
+import net.dpml.metro.model.MetroHelper;

/**
* Test a simple component case.
@@ -66,7 +66,7 @@
*/
public void testBadWidget() throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( "acme-bad-widget.part" );
Component component = helper.getCompositionManager().addComponent(
uri, "acme" );
AcmeContainer container = (AcmeContainer) component.resolve( false );
@@ -87,7 +87,7 @@

private void executeTestOnPart( String path ) throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( path );
Component component = helper.getCompositionManager().addComponent(
uri, "acme" );
AcmeContainer container = (AcmeContainer) component.resolve( false );

Modified:
development/main/test/unit/simple/src/test/net/dpml/test/acme/ExampleTestCase.java
==============================================================================
---
development/main/test/unit/simple/src/test/net/dpml/test/acme/ExampleTestCase.java
(original)
+++
development/main/test/unit/simple/src/test/net/dpml/test/acme/ExampleTestCase.java
Wed Jun 22 15:43:29 2005
@@ -29,7 +29,7 @@
import net.dpml.part.model.Component;
import net.dpml.part.control.Controller;

-import net.dpml.composition.unit.CompositionHelper;
+import net.dpml.metro.model.MetroHelper;

/**
* Test a simple component case.
@@ -45,7 +45,7 @@
*/
public void testExampleUsingValue() throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( "acme-example-one.part" );
Model model = helper.getCompositionManager().getModel( uri,
"example" );
Example example = (Example) model.getProvider().resolve();
@@ -59,7 +59,7 @@
*/
public void testExampleUsingComponent() throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( "acme-example-two.part" );
Model model = helper.getCompositionManager().getModel( uri,
"example" );
Example example = (Example) model.getProvider().resolve();
@@ -72,7 +72,7 @@
*/
public void testExampleUsingContainer() throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( "acme-example-three.part" );
Model model = helper.getCompositionManager().getModel( uri,
"example" );
Example example = (Example) model.getProvider().resolve();
@@ -86,7 +86,7 @@
*/
public void testExampleUsingPartReference() throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( "acme-example-four.part" );
Model model = helper.getCompositionManager().getModel( uri,
"example" );
Example example = (Example) model.getProvider().resolve();

Modified:
development/main/test/unit/simple/src/test/net/dpml/test/acme/SimpleTestCase.java
==============================================================================
---
development/main/test/unit/simple/src/test/net/dpml/test/acme/SimpleTestCase.java
(original)
+++
development/main/test/unit/simple/src/test/net/dpml/test/acme/SimpleTestCase.java
Wed Jun 22 15:43:29 2005
@@ -29,7 +29,7 @@
import net.dpml.part.control.Controller;
import net.dpml.part.control.Manager;

-import net.dpml.composition.unit.CompositionHelper;
+import net.dpml.metro.model.MetroHelper;

/**
* Test a simple component case.
@@ -52,7 +52,7 @@
*/
public void testGetValue() throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( PATH );
Model model = helper.getCompositionManager().getModel( uri, "widget"
);
Widget widget = (Widget) model.getProvider().resolve();
@@ -66,7 +66,7 @@
*/
public void testDimensionInWidget() throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( "acme-widget.part" );
Model model = helper.getCompositionManager().getModel( uri, "widget"
);
Widget widget = (Widget) model.getProvider().resolve();
@@ -79,7 +79,7 @@
*/
public void testServiceIsolation() throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( PATH );
Model model = helper.getCompositionManager().getModel( uri, "widget"
);
Widget widget = (Widget) model.getProvider().resolve();
@@ -104,7 +104,7 @@
*/
public void testNonProxiedCreation() throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( PATH );
Model model = helper.getCompositionManager().getModel( uri, "widget"
);
WidgetComponent widget = (WidgetComponent)
model.getProvider().resolve( false );
@@ -123,7 +123,7 @@
public void testIdentifiableManagerCreation() throws Exception
{
String id = "steve";
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( PATH );
Model model = helper.getCompositionManager().getModel( uri, "widget"
);
WidgetComponent widget = (WidgetComponent) model.getProvider( id
).resolve( false );
@@ -139,7 +139,7 @@
*/
public void testIdentifiableCreation() throws Exception
{
- CompositionHelper helper = new CompositionHelper();
+ MetroHelper helper = new MetroHelper();
URI uri = helper.toURI( PATH );
Model model = helper.getCompositionManager().getModel( uri, "widget"
);
Controller controller = model.getController();



  • svn commit: r2901 - in development/main: metro/composition/control/src/main/net/dpml/composition/unit metro/main/src/main/net/dpml/metro/model test/unit test/unit/plus/src/test/net/dpml/test/acme/plus test/unit/simple/src/test/net/dpml/test/acme, mcconnell, 06/22/2005

Archive powered by MHonArc 2.6.24.

Top of Page