notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r873 - trunk/main/metro/model/src/test/net/dpml/metro/data/test
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r873 - trunk/main/metro/model/src/test/net/dpml/metro/data/test
- Date: Sat, 7 Jan 2006 20:07:37 +0100
Author: mcconnell
Date: 2006-01-07 20:07:33 +0100 (Sat, 07 Jan 2006)
New Revision: 873
Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/AbstractEncodingTestCase.java
trunk/main/metro/model/src/test/net/dpml/metro/data/test/CategoriesDirectiveTestCase.java
trunk/main/metro/model/src/test/net/dpml/metro/data/test/CategoryDirectiveTestCase.java
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ClassLoaderDirectiveTestCase.java
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ClasspathDirectiveTestCase.java
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ComponentDirectiveTestCase.java
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ContextDirectiveTestCase.java
trunk/main/metro/model/src/test/net/dpml/metro/data/test/FeatureDirectiveTestCase.java
trunk/main/metro/model/src/test/net/dpml/metro/data/test/PartReferenceTestCase.java
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ReferenceDirectiveTestCase.java
Log:
clean model/data of checkstyle issues
Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/AbstractEncodingTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/AbstractEncodingTestCase.java
2006-01-07 18:13:58 UTC (rev 872)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/AbstractEncodingTestCase.java
2006-01-07 19:07:33 UTC (rev 873)
@@ -23,33 +23,33 @@
import java.io.FileOutputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.beans.Encoder;
import java.beans.XMLDecoder;
import java.beans.XMLEncoder;
import java.beans.ExceptionListener;
import java.beans.Expression;
-import java.beans.PersistenceDelegate;
import java.beans.DefaultPersistenceDelegate;
import java.net.URI;
import junit.framework.TestCase;
-import net.dpml.metro.info.PartReference;
-
-import net.dpml.metro.data.ValueDirective;
import net.dpml.metro.data.ComponentDirective;
/**
- * EntryDescriptorTestCase does XYZ
+ * AbstractEncodingTestCase.
*
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
*/
public abstract class AbstractEncodingTestCase extends TestCase
{
+ /**
+ * Execution of an encoding test.
+ * @param object the object encode/decode
+ * @param filename the filename to use when encoding the object
+ * @return the decoded object
+ * @exception Exception if an error occurs
+ */
public Object executeEncodingTest( Object object, String filename )
throws Exception
{
String base = System.getProperty( "project.test.dir" );
@@ -94,13 +94,22 @@
}
}
+ /**
+ * Utility class that handles uri encoding.
+ */
public static class URIPersistenceDelegate extends
DefaultPersistenceDelegate
{
+ /**
+ * Return an expression supporting creation of a uri.
+ * @param old the old instance
+ * @param encoder the encoder
+ * @return the expression
+ */
public Expression instantiate( Object old, Encoder encoder )
{
URI uri = (URI) old;
String spec = uri.toString();
- Object[] args = new Object[]{ spec };
+ Object[] args = new Object[]{spec};
return new Expression( old, old.getClass(), "new", args );
}
}
Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/CategoriesDirectiveTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/CategoriesDirectiveTestCase.java
2006-01-07 18:13:58 UTC (rev 872)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/CategoriesDirectiveTestCase.java
2006-01-07 19:07:33 UTC (rev 873)
@@ -18,33 +18,12 @@
package net.dpml.metro.data.test;
-import java.net.URI;
-
-import net.dpml.metro.data.ComponentDirective;
import net.dpml.metro.data.CategoriesDirective;
import net.dpml.metro.data.CategoryDirective;
-import net.dpml.metro.data.ContextDirective;
-import net.dpml.metro.data.ClassLoaderDirective;
-import net.dpml.metro.data.ClasspathDirective;
-import net.dpml.metro.info.CollectionPolicy;
-import net.dpml.metro.info.LifestylePolicy;
-import net.dpml.metro.info.PartReference;
import net.dpml.metro.info.Priority;
-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.impl.DefaultConfiguration;
-
-import net.dpml.parameters.Parameters;
-import net.dpml.parameters.impl.DefaultParameters;
-
-import net.dpml.part.ActivationPolicy;
-
-import net.dpml.transit.Category;
-
-import junit.framework.TestCase;
-
/**
- * CategoryDirectiveTestCase
+ * CategoriesDirectiveTestCase.
*
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
@@ -57,6 +36,10 @@
private CategoryDirective[] m_categories;
private CategoriesDirective m_directive;
+ /**
+ * Test case setup.
+ * @exception Exception if an error occurs
+ */
public void setUp() throws Exception
{
m_name = "test";
@@ -72,6 +55,10 @@
m_directive = new CategoriesDirective( m_name, m_priority, m_target,
m_categories );
}
+ /**
+ * Test the CategoriesDirective( String name ) constructor.
+ * @exception Exception if an error occurs
+ */
public void testNameConstructor() throws Exception
{
CategoriesDirective directive = new CategoriesDirective( m_name );
@@ -81,6 +68,10 @@
assertEquals( "categories", 0, directive.getCategories().length );
}
+ /**
+ * Test the CategoriesDirective( CategoryDirective[] categories )
constructor.
+ * @exception Exception if an error occurs
+ */
public void testCategoriesConstructor() throws Exception
{
CategoriesDirective directive = new CategoriesDirective(
m_categories );
@@ -90,26 +81,46 @@
assertEquals( "categories", m_categories.length,
directive.getCategories().length );
}
+ /**
+ * Test the name accessor.
+ * @exception Exception if an error occurs
+ */
public void testName() throws Exception
{
assertEquals( "name", m_name, m_directive.getName() );
}
+ /**
+ * Test the priority accessor.
+ * @exception Exception if an error occurs
+ */
public void testPriority() throws Exception
{
assertEquals( "priority", m_priority, m_directive.getPriority() );
}
+ /**
+ * Test the target accessor.
+ * @exception Exception if an error occurs
+ */
public void testTarget() throws Exception
{
assertEquals( "target", m_target, m_directive.getTarget() );
}
+ /**
+ * Test the categories array accessor.
+ * @exception Exception if an error occurs
+ */
public void testCategories() throws Exception
{
assertEquals( "categories", m_categories.length,
m_directive.getCategories().length );
}
+ /**
+ * Test directive encoding.
+ * @exception Exception if an error occurs
+ */
public void testEncoding() throws Exception
{
CategoryDirective result =
Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/CategoryDirectiveTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/CategoryDirectiveTestCase.java
2006-01-07 18:13:58 UTC (rev 872)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/CategoryDirectiveTestCase.java
2006-01-07 19:07:33 UTC (rev 873)
@@ -18,31 +18,9 @@
package net.dpml.metro.data.test;
-import java.net.URI;
-
-import net.dpml.metro.data.ComponentDirective;
-import net.dpml.metro.data.CategoriesDirective;
import net.dpml.metro.data.CategoryDirective;
-import net.dpml.metro.data.ContextDirective;
-import net.dpml.metro.data.ClassLoaderDirective;
-import net.dpml.metro.data.ClasspathDirective;
-import net.dpml.metro.info.CollectionPolicy;
-import net.dpml.metro.info.LifestylePolicy;
-import net.dpml.metro.info.PartReference;
import net.dpml.metro.info.Priority;
-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.impl.DefaultConfiguration;
-
-import net.dpml.parameters.Parameters;
-import net.dpml.parameters.impl.DefaultParameters;
-
-import net.dpml.part.ActivationPolicy;
-
-import net.dpml.transit.Category;
-
-import junit.framework.TestCase;
-
/**
* CategoryDirectiveTestCase
*
@@ -54,9 +32,12 @@
private String m_name;
private Priority m_priority;
private String m_target;
-
private CategoryDirective m_directive;
+ /**
+ * Setup the test case.
+ * @exception Exception if an error occurs.
+ */
public void setUp() throws Exception
{
m_name = "test";
@@ -65,6 +46,10 @@
m_directive = new CategoryDirective( m_name, m_priority, m_target );
}
+ /**
+ * Test the single argument constructor.
+ * @exception Exception if an error occurs
+ */
public void testSingleArgConstructor() throws Exception
{
CategoryDirective directive = new CategoryDirective( m_name );
@@ -73,6 +58,10 @@
assertNull( "target", directive.getTarget() );
}
+ /**
+ * Test the dual argument constructor.
+ * @exception Exception if an error occurs
+ */
public void testDualArgConstructor() throws Exception
{
CategoryDirective directive = new CategoryDirective( m_name,
m_priority );
@@ -81,6 +70,10 @@
assertNull( "target", directive.getTarget() );
}
+ /**
+ * Test the full argument constructor.
+ * @exception Exception if an error occurs
+ */
public void testFullConstructor() throws Exception
{
CategoryDirective directive = new CategoryDirective( m_name,
m_priority, m_target );
@@ -89,21 +82,37 @@
assertEquals( "target", m_target, directive.getTarget() );
}
+ /**
+ * Test the name accessor.
+ * @exception Exception if an error occurs
+ */
public void testName() throws Exception
{
assertEquals( "name", m_name, m_directive.getName() );
}
+ /**
+ * Test the priority accessor.
+ * @exception Exception if an error occurs
+ */
public void testPriority() throws Exception
{
assertEquals( "priority", m_priority, m_directive.getPriority() );
}
+ /**
+ * Test the target accessor.
+ * @exception Exception if an error occurs
+ */
public void testTarget() throws Exception
{
assertEquals( "target", m_target, m_directive.getTarget() );
}
+ /**
+ * Test the directive encoding/decoding.
+ * @exception Exception if an error occurs
+ */
public void testEncoding() throws Exception
{
CategoryDirective result =
Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ClassLoaderDirectiveTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ClassLoaderDirectiveTestCase.java
2006-01-07 18:13:58 UTC (rev 872)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ClassLoaderDirectiveTestCase.java
2006-01-07 19:07:33 UTC (rev 873)
@@ -20,30 +20,13 @@
import java.net.URI;
-import net.dpml.metro.data.ComponentDirective;
-import net.dpml.metro.data.CategoriesDirective;
-import net.dpml.metro.data.CategoryDirective;
-import net.dpml.metro.data.ContextDirective;
import net.dpml.metro.data.ClassLoaderDirective;
import net.dpml.metro.data.ClasspathDirective;
-import net.dpml.metro.info.CollectionPolicy;
-import net.dpml.metro.info.LifestylePolicy;
-import net.dpml.metro.info.PartReference;
-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.impl.DefaultConfiguration;
-
-import net.dpml.parameters.Parameters;
-import net.dpml.parameters.impl.DefaultParameters;
-
-import net.dpml.part.ActivationPolicy;
-
import net.dpml.transit.Category;
-import junit.framework.TestCase;
-
/**
- * ClasspathDirectiveTestCase
+ * ClassLoaderDirectiveTestCase.
*
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
@@ -56,15 +39,23 @@
private ClasspathDirective[] m_classpath;
private ClassLoaderDirective m_directive;
+ /**
+ * Setup the test case.
+ * @exception Exception if an error occurs.
+ */
public void setUp() throws Exception
{
m_public = new ClasspathDirective( Category.PUBLIC, new URI[0] );
m_protected = new ClasspathDirective( Category.PROTECTED, new URI[0]
);
m_private = new ClasspathDirective( Category.PRIVATE, new URI[0] );
- m_classpath = new ClasspathDirective[]{ m_public, m_protected,
m_private };
+ m_classpath = new ClasspathDirective[]{m_public, m_protected,
m_private};
m_directive = new ClassLoaderDirective( m_classpath );
}
+ /**
+ * Test the directive encoding/decoding.
+ * @exception Exception if an error occurs
+ */
public void testEncoding() throws Exception
{
ClassLoaderDirective result =
@@ -72,6 +63,9 @@
assertEquals( "encoded-equality", m_directive, result );
}
+ /**
+ * Test the classpath directives array accessor.
+ */
public void testClasspath()
{
assertEquals( "classpath", m_classpath.length,
m_directive.getClasspathDirectives().length );
Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ClasspathDirectiveTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ClasspathDirectiveTestCase.java
2006-01-07 18:13:58 UTC (rev 872)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ClasspathDirectiveTestCase.java
2006-01-07 19:07:33 UTC (rev 873)
@@ -20,30 +20,12 @@
import java.net.URI;
-import net.dpml.metro.data.ComponentDirective;
-import net.dpml.metro.data.CategoriesDirective;
-import net.dpml.metro.data.CategoryDirective;
-import net.dpml.metro.data.ContextDirective;
-import net.dpml.metro.data.ClassLoaderDirective;
import net.dpml.metro.data.ClasspathDirective;
-import net.dpml.metro.info.CollectionPolicy;
-import net.dpml.metro.info.LifestylePolicy;
-import net.dpml.metro.info.PartReference;
-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.impl.DefaultConfiguration;
-
-import net.dpml.parameters.Parameters;
-import net.dpml.parameters.impl.DefaultParameters;
-
-import net.dpml.part.ActivationPolicy;
-
import net.dpml.transit.Category;
-import junit.framework.TestCase;
-
/**
- * ClasspathDirectiveTestCase
+ * ClasspathDirectiveTestCase.
*
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
@@ -56,6 +38,10 @@
private ClasspathDirective m_directive;
+ /**
+ * Setup the test case.
+ * @exception Exception if an error occurs.
+ */
public void setUp() throws Exception
{
m_uriA = new URI( "link:part:fred/wilma" );
@@ -64,20 +50,31 @@
m_directive = new ClasspathDirective( Category.PUBLIC, m_uris );
}
- public void testEncoding() throws Exception
+ /**
+ * Test the uris accessor.
+ */
+ public void testURIs()
{
- ClasspathDirective result =
- (ClasspathDirective) executeEncodingTest( m_directive,
"classpath-directive.xml" );
- assertEquals( "encoded-equality", m_directive, result );
+ assertEquals( "uris", m_uris.length, m_directive.getURIs().length );
}
+ /**
+ * Test the category accessor.
+ */
public void testCategory()
{
assertEquals( "category", Category.PUBLIC, m_directive.getCategory()
);
}
- public void testURIs()
+ /**
+ * Test the directive encoding/decoding.
+ * @exception Exception if an error occurs
+ */
+ public void testEncoding() throws Exception
{
- assertEquals( "uris", m_uris.length, m_directive.getURIs().length );
+ ClasspathDirective result =
+ (ClasspathDirective) executeEncodingTest( m_directive,
"classpath-directive.xml" );
+ assertEquals( "encoded-equality", m_directive, result );
}
+
}
Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ComponentDirectiveTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ComponentDirectiveTestCase.java
2006-01-07 18:13:58 UTC (rev 872)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ComponentDirectiveTestCase.java
2006-01-07 19:07:33 UTC (rev 873)
@@ -40,8 +40,6 @@
import net.dpml.transit.Category;
-import junit.framework.TestCase;
-
/**
* ComponentDirectiveTestCase
*
@@ -62,6 +60,10 @@
private ClassLoaderDirective m_classloader;
private ComponentDirective m_directive;
+ /**
+ * Setup the test case.
+ * @exception Exception if an error occurs.
+ */
public void setUp() throws Exception
{
m_name = "test";
@@ -80,6 +82,9 @@
m_categories, m_context, m_parameters, m_configuration,
m_classloader );
}
+ /**
+ * Test the classloader directive constructor.
+ */
private ClassLoaderDirective createClassLoaderDirective()
{
ClasspathDirective[] paths = new ClasspathDirective[3];
@@ -89,6 +94,10 @@
return new ClassLoaderDirective( paths );
}
+ /**
+ * Test the directive encoding/decoding.
+ * @exception Exception if an error occurs
+ */
public void testEncoding() throws Exception
{
ComponentDirective result =
@@ -96,11 +105,17 @@
assertEquals( "encoded-equality", m_directive, result );
}
+ /**
+ * Test the name accessor.
+ */
public void testName()
{
assertEquals( "name", m_name, m_directive.getName() );
}
+ /**
+ * Test "" name.
+ */
public void testUnsufficientName()
{
try
@@ -116,6 +131,9 @@
}
}
+ /**
+ * Test "." in name.
+ */
public void testIllegalPeriodInName()
{
try
@@ -131,6 +149,9 @@
}
}
+ /**
+ * Test "," in name.
+ */
public void testIllegalCommaInName()
{
try
@@ -146,6 +167,9 @@
}
}
+ /**
+ * Test "/" in name.
+ */
public void testIllegalFowardSlashInName()
{
try
@@ -161,46 +185,73 @@
}
}
+ /**
+ * Test activation policy accessor.
+ */
public void testActivationPolicy()
{
assertEquals( "activation", m_activation,
m_directive.getActivationPolicy() );
}
+ /**
+ * Test collection policy accessor.
+ */
public void testCollectionPolicy()
{
assertEquals( "collection", m_collection,
m_directive.getCollectionPolicy() );
}
+ /**
+ * Test lifestyle policy accessor.
+ */
public void testLifestylePolicy()
{
assertEquals( "lifestyle", m_lifestyle,
m_directive.getLifestylePolicy() );
}
+ /**
+ * Test classname accessor.
+ */
public void testClassname()
{
assertEquals( "classname", m_classname, m_directive.getClassname() );
}
+ /**
+ * Test categories accessor.
+ */
public void testCategories()
{
assertEquals( "categories", m_categories,
m_directive.getCategoriesDirective() );
}
+ /**
+ * Test context accessor.
+ */
public void testContext()
{
assertEquals( "context", m_context,
m_directive.getContextDirective() );
}
+ /**
+ * Test parameters accessor.
+ */
public void testParameters()
{
assertEquals( "parameters", m_parameters,
m_directive.getParameters() );
}
+ /**
+ * Test configuration accessor.
+ */
public void testConfiguration()
{
assertEquals( "configuration", m_configuration,
m_directive.getConfiguration() );
}
+ /**
+ * Test classloader accessor.
+ */
public void testClassLoaderDirective()
{
assertEquals( "classloader", m_classloader,
m_directive.getClassLoaderDirective() );
Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ContextDirectiveTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ContextDirectiveTestCase.java
2006-01-07 18:13:58 UTC (rev 872)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ContextDirectiveTestCase.java
2006-01-07 19:07:33 UTC (rev 873)
@@ -18,32 +18,11 @@
package net.dpml.metro.data.test;
-import java.net.URI;
-
-import net.dpml.metro.data.ComponentDirective;
-import net.dpml.metro.data.CategoriesDirective;
-import net.dpml.metro.data.CategoryDirective;
import net.dpml.metro.data.ContextDirective;
-import net.dpml.metro.data.ClassLoaderDirective;
-import net.dpml.metro.data.ClasspathDirective;
-import net.dpml.metro.info.CollectionPolicy;
-import net.dpml.metro.info.LifestylePolicy;
import net.dpml.metro.info.PartReference;
-import net.dpml.configuration.Configuration;
-import net.dpml.configuration.impl.DefaultConfiguration;
-
-import net.dpml.parameters.Parameters;
-import net.dpml.parameters.impl.DefaultParameters;
-
-import net.dpml.part.ActivationPolicy;
-
-import net.dpml.transit.Category;
-
-import junit.framework.TestCase;
-
/**
- * ComponentDirectiveTestCase
+ * ContextDirectiveTestCase.
*
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
@@ -52,27 +31,39 @@
{
private ContextDirective m_context;
+ /**
+ * Setup the test case.
+ * @exception Exception if an error occurs.
+ */
public void setUp() throws Exception
{
m_context = new ContextDirective( new PartReference[0] );
}
- public void testEncoding() throws Exception
- {
- ContextDirective result =
- (ContextDirective) executeEncodingTest( m_context,
"context-directive.xml" );
- assertEquals( "encoded-equality", m_context, result );
- }
-
+ /**
+ * Test the classname accessor.
+ */
public void testClassname()
{
assertEquals( "classname", null, m_context.getClassname() );
}
+ /**
+ * Test the directive accessor.
+ */
public void testEntries()
{
assertEquals( "entries", 0, m_context.getDirectives().length );
}
-
+ /**
+ * Test the directive encoding/decoding.
+ * @exception Exception if an error occurs
+ */
+ public void testEncoding() throws Exception
+ {
+ ContextDirective result =
+ (ContextDirective) executeEncodingTest( m_context,
"context-directive.xml" );
+ assertEquals( "encoded-equality", m_context, result );
+ }
}
Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/FeatureDirectiveTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/FeatureDirectiveTestCase.java
2006-01-07 18:13:58 UTC (rev 872)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/FeatureDirectiveTestCase.java
2006-01-07 19:07:33 UTC (rev 873)
@@ -21,13 +21,17 @@
import net.dpml.metro.data.FeatureDirective;
/**
- * Test encoding of the reference directive.
+ * Test encoding of the feature directive.
*
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
*/
public class FeatureDirectiveTestCase extends AbstractEncodingTestCase
{
+ /**
+ * Test the directive encoding/decoding.
+ * @exception Exception if an error occurs
+ */
public void testEncoding() throws Exception
{
FeatureDirective value = new FeatureDirective( "key",
FeatureDirective.NAME );
Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/PartReferenceTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/PartReferenceTestCase.java
2006-01-07 18:13:58 UTC (rev 872)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/PartReferenceTestCase.java
2006-01-07 19:07:33 UTC (rev 873)
@@ -18,29 +18,29 @@
package net.dpml.metro.data.test;
-import junit.framework.TestCase;
-
import net.dpml.metro.info.PartReference;
import net.dpml.part.Directive;
import net.dpml.metro.data.ValueDirective;
-import net.dpml.transit.Construct;
-
/**
- * EntryDescriptorTestCase does XYZ
+ * PartReferenceTestCase.
*
* @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
* @version @PROJECT-VERSION@
*/
public class PartReferenceTestCase extends AbstractEncodingTestCase
{
- private static final String m_key = "key";
- private static final Directive m_part = new ValueDirective( "abc" );
+ private static final String KEY = "key";
+ private static final Directive PART = new ValueDirective( "abc" );
+ /**
+ * Test the directive encoding/decoding.
+ * @exception Exception if an error occurs
+ */
public void testEncoding() throws Exception
{
- PartReference ref = new PartReference( m_key, m_part );
+ PartReference ref = new PartReference( KEY, PART );
executeEncodingTest( ref, "part-reference.xml" );
}
}
Modified:
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ReferenceDirectiveTestCase.java
===================================================================
---
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ReferenceDirectiveTestCase.java
2006-01-07 18:13:58 UTC (rev 872)
+++
trunk/main/metro/model/src/test/net/dpml/metro/data/test/ReferenceDirectiveTestCase.java
2006-01-07 19:07:33 UTC (rev 873)
@@ -30,9 +30,13 @@
*/
public class ReferenceDirectiveTestCase extends AbstractEncodingTestCase
{
+ /**
+ * Test the directive encoding/decoding.
+ * @exception Exception if an error occurs
+ */
public void testEncoding() throws Exception
{
- URI uri = new URI( "lookup:anything" ) ;
+ URI uri = new URI( "lookup:anything" );
ReferenceDirective value = new ReferenceDirective( uri );
executeEncodingTest( value, "reference-directive.xml" );
}
- r873 - trunk/main/metro/model/src/test/net/dpml/metro/data/test, mcconnell at BerliOS, 01/07/2006
Archive powered by MHonArc 2.6.24.