Skip to Content.
Sympa Menu

notify-dpml - r885 - trunk/main/metro/test/src/test/net/dpml/metro/runtime/test

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r885 - trunk/main/metro/test/src/test/net/dpml/metro/runtime/test
  • Date: Sun, 8 Jan 2006 23:23:05 +0100

Author: mcconnell
Date: 2006-01-08 23:23:04 +0100 (Sun, 08 Jan 2006)
New Revision: 885

Modified:

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ComponentModelTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/CompositeTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ContextModelTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/DisposalTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/LifecycleTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/NullTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ObserverTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ParamsTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/PartsTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ProviderTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/SingletonProviderTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/StateTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/TransientProviderTestCase.java

trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/WeakCollectionPolicyTestCase.java
Log:
checkstyle cleanup

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ComponentModelTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ComponentModelTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ComponentModelTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -23,10 +23,8 @@

import junit.framework.TestCase;

-import net.dpml.part.Directive;
import net.dpml.part.Controller;
import net.dpml.part.ActivationPolicy;
-import net.dpml.state.State;
import net.dpml.metro.info.LifestylePolicy;
import net.dpml.metro.info.CollectionPolicy;
import net.dpml.metro.model.ComponentModel;
@@ -141,7 +139,7 @@
{
try
{
- ComponentModel child = m_model.getComponentModel( "xyz");
+ ComponentModel child = m_model.getComponentModel( "xyz" );
}
catch( UnknownKeyException e )
{

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/CompositeTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/CompositeTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/CompositeTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -29,7 +29,6 @@
import net.dpml.part.Provider;
import net.dpml.part.Manager;

-import net.dpml.test.ColorManager;
import net.dpml.test.composite.ChildComponent;
import net.dpml.test.composite.CompositeComponent;

@@ -81,7 +80,8 @@
public void testOverloadedComposite() throws Exception
{
Component component = CONTROLLER.createComponent( m_uri );
- ((Manager)component).getContextMap().put( "color", Color.YELLOW );
+ Manager manager = (Manager) component;
+ manager.getContextMap().put( "color", Color.YELLOW );
Provider instance = component.getProvider();
CompositeComponent parent = (CompositeComponent) instance.getValue(
false );
Color color = parent.getColor();

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ContextModelTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ContextModelTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ContextModelTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -33,10 +33,6 @@
import net.dpml.metro.model.ValidationException;
import net.dpml.metro.model.ValidationException.Issue;

-import net.dpml.transit.model.UnknownKeyException;
-
-import net.dpml.test.ExampleComponent;
-
/**
* Test aspects of the component context model implementation.
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/DisposalTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/DisposalTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/DisposalTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -62,7 +62,8 @@
{
component.getProvider();
}
- ((Disposable)component).dispose();
+ Disposable disposable = (Disposable) component;
+ disposable.dispose();
assertEquals( "count", 0, component.size() );
}


Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/LifecycleTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/LifecycleTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/LifecycleTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -41,6 +41,10 @@

private URI m_uri;

+ /**
+ * Test case setup.
+ * @exception Exception if an error occurs
+ */
public void setUp() throws Exception
{
final String path = "lifecycle.part";
@@ -50,6 +54,7 @@

/**
* Test that the component initial state is inactive.
+ * @exception Exception if an error occurs
*/
public void testLifecycle() throws Exception
{

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/NullTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/NullTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/NullTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -29,7 +29,11 @@
*/
public class NullTestCase extends TestCase
{
- public void testColor() throws Exception
+ /**
+ * Test time consumed in controlller establishment.
+ * @exception Exception if an error occurs
+ */
+ public void testControllerEstablishment() throws Exception
{
Controller control = Controller.STANDARD;
assertNotNull( "control", control );

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ObserverTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ObserverTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ObserverTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -28,17 +28,9 @@
import net.dpml.part.Controller;
import net.dpml.part.Provider;
import net.dpml.metro.data.ValueDirective;
-import net.dpml.metro.info.EntryDescriptor;
import net.dpml.metro.model.ComponentModel;
-import net.dpml.metro.model.ContextModel;
import net.dpml.metro.model.MutableContextModel;
-import net.dpml.metro.model.ValidationException;
-import net.dpml.metro.model.ValidationException.Issue;

-import net.dpml.transit.model.UnknownKeyException;
-
-import net.dpml.test.ExampleComponent;
-
/**
* Test aspects of the component model implementation.
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
@@ -48,6 +40,10 @@
{
private ComponentModel m_model;

+ /**
+ * Test case setup.
+ * @exception Exception if an error occurs
+ */
public void setUp() throws Exception
{
final String path = "observer.part";
@@ -56,6 +52,10 @@
m_model = (ComponentModel) Controller.STANDARD.createModel( uri );
}

+ /**
+ * Test mutation of the context model.
+ * @exception Exception if an error occurs
+ */
public void testContextModel() throws Exception
{
MutableContextModel context = (MutableContextModel)
m_model.getContextModel();

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ParamsTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ParamsTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ParamsTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -41,6 +41,10 @@

private URI m_uri;

+ /**
+ * Test case setup.
+ * @exception Exception if an error occurs
+ */
public void setUp() throws Exception
{
final String path = "params.part";
@@ -50,6 +54,7 @@

/**
* Test that the component initial state is inactive.
+ * @exception Exception if an error occurs
*/
public void testCategories() throws Exception
{

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/PartsTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/PartsTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/PartsTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -28,7 +28,6 @@
import net.dpml.part.Component;
import net.dpml.part.Provider;

-import net.dpml.test.ColorManager;
import net.dpml.test.composite.ChildComponent;
import net.dpml.test.composite.PartsComponent;

@@ -44,6 +43,10 @@

private URI m_uri;

+ /**
+ * Test case setup.
+ * @exception Exception if an error occurs
+ */
public void setUp() throws Exception
{
final String path = "parts.part";
@@ -54,6 +57,7 @@
/**
* Validate composite instantiation and in particular that the color
* assigned to the child component has been overriden by the parent.
+ * @exception Exception if an error occurs
*/
public void testComposite() throws Exception
{
@@ -67,24 +71,6 @@
assertEquals( "color", color, c );
}

- /**
- * Validate composite instantiation with an overloader parent context.
- */
- /*
- public void testOverloadedComposite() throws Exception
- {
- Component component = CONTROLLER.createComponent( m_uri );
- ((Context)component).getContextMap().put( "color", Color.YELLOW );
- Provider instance = component.getProvider();
- CompositeComponent parent = (CompositeComponent) instance.getValue(
false );
- Color color = parent.getColor();
- assertEquals( "parent-color", Color.YELLOW, color );
- ChildComponent child = parent.getChild();
- Color c = child.getColor();
- assertEquals( "color", color, c );
- }
- */
-
static
{
System.setProperty(

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ProviderTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ProviderTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/ProviderTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -32,7 +32,6 @@
import net.dpml.part.Provider;
import net.dpml.state.State;
import net.dpml.state.StateListener;
-import net.dpml.state.StateEvent;
import net.dpml.state.impl.DefaultStateListener;
import net.dpml.metro.data.ValueDirective;
import net.dpml.metro.model.ComponentModel;
@@ -52,6 +51,10 @@

private URI m_uri;

+ /**
+ * Test case setup.
+ * @exception Exception if an error occurs
+ */
public void setUp() throws Exception
{
final String path = "example.part";
@@ -59,6 +62,10 @@
m_uri = new File( test, path ).toURI();
}

+ /**
+ * Test state listener addition and removal.
+ * @exception Exception if an error occurs
+ */
public void testStateListenerAdditionAndRemoval() throws Exception
{
Component component = CONTROLLER.createComponent( m_uri );
@@ -70,6 +77,10 @@
component.deactivate();
}

+ /**
+ * Test illegal null listener addition.
+ * @exception Exception if an error occurs
+ */
public void testNullListenerAddition() throws Exception
{
Component component = CONTROLLER.createComponent( m_uri );
@@ -90,6 +101,10 @@
}
}

+ /**
+ * Test illegal null listener removal.
+ * @exception Exception if an error occurs
+ */
public void testNullListenerRemoval() throws Exception
{
Component component = CONTROLLER.createComponent( m_uri );
@@ -110,6 +125,10 @@
}
}

+ /**
+ * Test invalid listener removal.
+ * @exception Exception if an error occurs
+ */
public void testUnknownListenerRemoval() throws Exception
{
Component component = CONTROLLER.createComponent( m_uri );
@@ -131,6 +150,10 @@
}
}

+ /**
+ * Test activation/deactivation cycle.
+ * @exception Exception if an error occurs
+ */
public void testActivationDeactivationCycle() throws Exception
{
Component component = CONTROLLER.createComponent( m_uri );
@@ -142,7 +165,6 @@
{
State oldState = (State) event.getOldValue();
State state = (State) event.getNewValue();
- // TODO: some sort of validation procedure is needed here
}
} );
component.activate();
@@ -154,6 +176,10 @@
assertFalse( "is-active-following-deactivation",
component.isActive() );
}

+ /**
+ * Test proxied value instantiation.
+ * @exception Exception if an error occurs
+ */
public void testValueInstantiationWithProxy() throws Exception
{
Component component = CONTROLLER.createComponent( m_uri );
@@ -172,6 +198,10 @@
}
}

+ /**
+ * Test non-proxied value instantiation.
+ * @exception Exception if an error occurs
+ */
public void testValueInstantiationWithoutProxy() throws Exception
{
Component component = CONTROLLER.createComponent( m_uri );
@@ -190,6 +220,10 @@
}
}

+ /**
+ * Test provider context mutation.
+ * @exception Exception if an error occurs
+ */
public void testContextMutation() throws Exception
{
ComponentModel model = (ComponentModel) CONTROLLER.createModel(
m_uri );

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/SingletonProviderTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/SingletonProviderTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/SingletonProviderTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -38,6 +38,10 @@

private URI m_uri;

+ /**
+ * Test case setup.
+ * @exception Exception if an error occurs
+ */
public void setUp() throws Exception
{
final String path = "example-3.part";
@@ -45,6 +49,10 @@
m_uri = new File( test, path ).toURI();
}

+ /**
+ * Test multiple provider equivalence.
+ * @exception Exception if an error occurs
+ */
public void testSharedProviderSemantics() throws Exception
{
Component component = CONTROLLER.createComponent( m_uri );

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/StateTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/StateTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/StateTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -28,7 +28,6 @@
import net.dpml.part.Provider;

import net.dpml.test.state.Service;
-import net.dpml.test.state.ManagedComponent;
import net.dpml.test.state.ManagedComponent.Monitor;

/**
@@ -43,6 +42,10 @@

private URI m_uri;

+ /**
+ * Test case setup.
+ * @exception Exception if an error occurs
+ */
public void setUp() throws Exception
{
final String path = "state.part";
@@ -53,6 +56,7 @@
/**
* Validate composite instantiation and in particular that the color
* assigned to the child component has been overriden by the parent.
+ * @exception Exception if an error occurs
*/
public void testComponent() throws Exception
{

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/TransientProviderTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/TransientProviderTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/TransientProviderTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -38,6 +38,10 @@

private URI m_uri;

+ /**
+ * Test case setup.
+ * @exception Exception if an error occurs
+ */
public void setUp() throws Exception
{
final String path = "example-2.part";
@@ -45,6 +49,10 @@
m_uri = new File( test, path ).toURI();
}

+ /**
+ * Test transient provider semantics.
+ * @exception Exception if an error occurs
+ */
public void testTransientProviderSemantics() throws Exception
{
Component component = CONTROLLER.createComponent( m_uri );

Modified:
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/WeakCollectionPolicyTestCase.java
===================================================================
---
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/WeakCollectionPolicyTestCase.java
2006-01-08 21:54:17 UTC (rev 884)
+++
trunk/main/metro/test/src/test/net/dpml/metro/runtime/test/WeakCollectionPolicyTestCase.java
2006-01-08 22:23:04 UTC (rev 885)
@@ -38,6 +38,10 @@

private URI m_uri;

+ /**
+ * Test case setup.
+ * @exception Exception if an error occurs
+ */
public void setUp() throws Exception
{
final String path = "example-3.part";
@@ -45,6 +49,10 @@
m_uri = new File( test, path ).toURI();
}

+ /**
+ * Test weak collection semantics.
+ * @exception Exception if an error occurs
+ */
public void testCollection() throws Exception
{
Component component = CONTROLLER.createComponent( m_uri );




  • r885 - trunk/main/metro/test/src/test/net/dpml/metro/runtime/test, mcconnell at BerliOS, 01/08/2006

Archive powered by MHonArc 2.6.24.

Top of Page