notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2616 - development/main/test/unit/plus/src/test/net/dpml/test/acme/plus
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2616 - development/main/test/unit/plus/src/test/net/dpml/test/acme/plus
- Date: Thu, 19 May 2005 03:24:48 +0000
Author: mcconnell AT dpml.net
Date: Thu May 19 03:24:47 2005
New Revision: 2616
Modified:
development/main/test/unit/plus/src/test/net/dpml/test/acme/plus/URLTestCase.java
Log:
housekeeping
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
Thu May 19 03:24:47 2005
@@ -33,24 +33,38 @@
*/
public class URLTestCase extends TestCase
{
- public void setUp() throws Exception
- {
- System.setProperty( "java.protocol.handler.pkgs", "net.dpml.transit"
);
- System.setProperty( "java.util.logging.config.class",
"net.dpml.depot.logging.ConfigurationHandler" );
- System.setProperty( "dpml.transit.preferences.enabled", "true" );
- System.setProperty( "dpml.transit.content.plugin",
"@CONTENT-MANAGER-PLUGIN@" );
- }
-
/**
- * Check that the loading of a url results in the loading of the Part
class from the same classloader.
- * (i.e. validate that the caching of plugins in Transit is doing what it
should be doing).
+ * Check that the loading of a url results in the loading of the Part
+ * class from the same classloader. This validate that the caching of
plugins
+ * by the Transit content manager is doing what it should be doing. If
caching
+ * is not performing correctly the returned part classes will not be the
same.
*/
public void testPartLoading() throws Exception
{
- URL urlA = new URL( "@SIMPLE-TEST-PART@" );
+ URL urlA = new URL( SIMPLE_TEST_PART );
Part partA = (Part) urlA.getContent();
- URL urlB = new URL( "@PLUS-TEST-PART@" );
+ URL urlB = new URL( PLUS_TEST_PART );
Part partB = (Part) urlB.getContent();
assertEquals( "same class", partA.getClass(), partB.getClass() );
}
+
+ /**
+ * Setup the system properties to assign transit as a protocol handler,
depot's logging
+ * configuration so things are neat, make sure prefs are enabled, and
assign the composition
+ * content manager plugin as the preferred content manager (which will
make sure that our
+ * part content request are dealt with).
+ */
+ public void setUp() throws Exception
+ {
+ System.setProperty( "java.protocol.handler.pkgs", "net.dpml.transit"
);
+ System.setProperty( "java.util.logging.config.class",
"net.dpml.depot.logging.ConfigurationHandler" );
+ System.setProperty( "dpml.transit.preferences.enabled", "true" );
+ System.setProperty( "dpml.transit.content.plugin",
CONTENT_MANAGER_PLUGIN );
+ }
+
+ private final static String SIMPLE_TEST_PART = "@SIMPLE-TEST-PART@";
+ private final static String PLUS_TEST_PART = "@PLUS-TEST-PART@";
+ private final static String CONTENT_MANAGER_PLUGIN =
"@CONTENT-MANAGER-PLUGIN@";
+
+
}
- svn commit: r2616 - development/main/test/unit/plus/src/test/net/dpml/test/acme/plus, mcconnell, 05/18/2005
Archive powered by MHonArc 2.6.24.