Skip to Content.
Sympa Menu

notify-dpml - r1847 - in trunk/main/transit/core/src/test/dpml/transit: . artifact info

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: r1847 - in trunk/main/transit/core/src/test/dpml/transit: . artifact info
  • Date: Fri, 9 Feb 2007 02:19:18 +0100

Author: mcconnell
Date: 2007-02-09 02:19:15 +0100 (Fri, 09 Feb 2007)
New Revision: 1847

Added:
trunk/main/transit/core/src/test/dpml/transit/artifact/

trunk/main/transit/core/src/test/dpml/transit/artifact/MimeHandlerTestCase.java
trunk/main/transit/core/src/test/dpml/transit/info/
Removed:

trunk/main/transit/core/src/test/dpml/transit/info/CodeBaseDirectiveTestCase.java

trunk/main/transit/core/src/test/dpml/transit/info/LayoutDirectiveTestCase.java

trunk/main/transit/core/src/test/dpml/transit/info/ValueDirectiveTestCase.java
Modified:
trunk/main/transit/core/src/test/dpml/transit/info/AbstractTestCase.java

trunk/main/transit/core/src/test/dpml/transit/info/CacheDirectiveTestCase.java

trunk/main/transit/core/src/test/dpml/transit/info/HostDirectiveTestCase.java

trunk/main/transit/core/src/test/dpml/transit/info/ProxyDirectiveTestCase.java

trunk/main/transit/core/src/test/dpml/transit/info/TransitDirectiveTestCase.java
Log:
SDK 2.X staged commit.

Added:
trunk/main/transit/core/src/test/dpml/transit/artifact/MimeHandlerTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/dpml/transit/artifact/MimeHandlerTestCase.java
2007-02-08 23:55:30 UTC (rev 1846)
+++
trunk/main/transit/core/src/test/dpml/transit/artifact/MimeHandlerTestCase.java
2007-02-09 01:19:15 UTC (rev 1847)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2004 Niclas Hedhman.
+ * Copyright 2006 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 dpml.transit.artifact;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * MimeHandlerTestCase.
+ * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
+ * @version @PROJECT-VERSION@
+ */
+public final class MimeHandlerTestCase extends TestCase
+{
+ private static final String[][] TESTS = new String[][]
+ {
+ {"plugin", "text/x-dpml-plugin"},
+ {"conf", "text/x-dpml-conf"},
+ {"jar", "application/x-jar"},
+ {"zip", "application/x-zip"},
+ {"pdf", "application/pdf"},
+ {"png", "image/png"},
+ {"jpg", "image/jpg"},
+ {"gif", "image/gif"},
+ {"link", "application/x-dpml-link"},
+ {"part", "application/x-dpml-part"}
+ };
+
+ /**
+ * Return the test suite.
+ * @return the test
+ */
+ public static Test suite()
+ {
+ TestSuite tests = new TestSuite();
+ for( int i = 0; i<TESTS.length; i++ )
+ {
+ String lookup = TESTS[i][0];
+ String expected = TESTS[i][1];
+ String name = "testLookup";
+ TestCase testcase = new MimeHandlerTestCase( name, lookup,
expected );
+ tests.addTest( testcase );
+ }
+ String name = "testSize";
+ TestCase testcase = new MimeHandlerTestCase( name, null, null );
+ tests.addTest( testcase );
+ return tests;
+ }
+
+ private String m_lookup;
+ private String m_expected;
+
+ private MimeHandlerTestCase( String name, String lookup, String expected
)
+ {
+ super( name );
+ m_lookup = lookup;
+ m_expected = expected;
+ }
+
+ /**
+ * Test mime type lookup.
+ * @exception Exception if an error occurs
+ */
+ public void testLookup()
+ throws Exception
+ {
+ String mime = MimeTypeHandler.getMimeType( m_lookup );
+ assertEquals( m_lookup, m_expected, mime );
+ }
+
+ /**
+ * Test mime map size.
+ */
+ public void testSize()
+ {
+ assertEquals( "Map Size", TESTS.length,
MimeTypeHandler.getMimeTypesSize() );
+ }
+}

Copied: trunk/main/transit/core/src/test/dpml/transit/info (from rev 1810,
trunk/main/transit/core/src/test/net/dpml/transit/info)

Modified:
trunk/main/transit/core/src/test/dpml/transit/info/AbstractTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/AbstractTestCase.java
2007-01-10 20:29:19 UTC (rev 1810)
+++ trunk/main/transit/core/src/test/dpml/transit/info/AbstractTestCase.java
2007-02-09 01:19:15 UTC (rev 1847)
@@ -16,7 +16,7 @@
* limitations under the License.
*/

-package net.dpml.transit.info;
+package dpml.transit.info;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -29,7 +29,7 @@
/**
* Abstract testcase the provides utilities for serialization and
encoding/decoding tests.
*
- * @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
+ * @author <a href="http://www.dpml.net";>The Digital Product Management
Laboratory</a>
*/
abstract class AbstractTestCase extends TestCase
{

Modified:
trunk/main/transit/core/src/test/dpml/transit/info/CacheDirectiveTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/CacheDirectiveTestCase.java
2007-01-10 20:29:19 UTC (rev 1810)
+++
trunk/main/transit/core/src/test/dpml/transit/info/CacheDirectiveTestCase.java
2007-02-09 01:19:15 UTC (rev 1847)
@@ -16,7 +16,7 @@
* limitations under the License.
*/

-package net.dpml.transit.info;
+package dpml.transit.info;

/**
* Testing the CodeBaseDirective class.
@@ -30,7 +30,6 @@
private String m_cacheLayout;
private String m_local;
private String m_localLayout;
- private LayoutDirective[] m_layouts;
private HostDirective[] m_hosts;
private CacheDirective m_directive;

@@ -44,11 +43,10 @@
m_cacheLayout = "classic";
m_local = "${dpml.share}/local";
m_localLayout = "modern";
- m_layouts = new LayoutDirective[0];
m_hosts = new HostDirective[0];
m_directive =
new CacheDirective(
- m_cache, m_cacheLayout, m_local, m_localLayout, m_layouts,
m_hosts );
+ m_cache, m_cacheLayout, m_local, m_localLayout, m_hosts );
}

/**
@@ -88,15 +86,6 @@
}

/**
- * Test layouts accessor.
- * @exception Exception if an error occurs during setup.
- */
- public void testLayouts() throws Exception
- {
- assertEquals( "layouts", m_layouts,
m_directive.getLayoutDirectives() );
- }
-
- /**
* Test hosts accessor.
* @exception Exception if an error occurs during setup.
*/

Deleted:
trunk/main/transit/core/src/test/dpml/transit/info/CodeBaseDirectiveTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/CodeBaseDirectiveTestCase.java
2007-01-10 20:29:19 UTC (rev 1810)
+++
trunk/main/transit/core/src/test/dpml/transit/info/CodeBaseDirectiveTestCase.java
2007-02-09 01:19:15 UTC (rev 1847)
@@ -1,139 +0,0 @@
-/*
- * Copyright 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.transit.info;
-
-import java.net.URI;
-
-import net.dpml.lang.ValueDirective;
-
-/**
- * Testing the CodeBaseDirective class.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public class CodeBaseDirectiveTestCase extends AbstractTestCase
-{
- private URI m_codebase;
- private ValueDirective[] m_values;
-
- /**
- * Return the test codebase value.
- * @return the codebase spec
- */
- protected URI getCodebaseValue()
- {
- return m_codebase;
- }
-
- /**
- * Return the test value directives.
- * @return the value directive array
- */
- protected ValueDirective[] getValueDirectives()
- {
- return m_values;
- }
-
- /**
- * Test case setup.
- * @exception Exception if an error occurs during setup.
- */
- public void setUp() throws Exception
- {
- m_codebase = new URI( "link:test:whatever" );
- ValueDirective v1 = new ValueDirective( "abc" );
- ValueDirective v2 = new ValueDirective( "def" );
- m_values = new ValueDirective[]{v1, v2};
- }
-
- /**
- * Test codebase uri spec accessor.
- * @exception Exception if an error occurs during setup.
- */
- public void testGetCodeBaseURISpec() throws Exception
- {
- CodeBaseDirective directive = new CodeBaseDirective( m_codebase,
m_values );
- assertEquals( "codebase-spec", m_codebase.toASCIIString(),
directive.getCodeBaseURISpec() );
- }
-
- /**
- * Test codebase uri accessor.
- * @exception Exception if an error occurs during setup.
- */
- public void testGetCodeBaseURI() throws Exception
- {
- CodeBaseDirective directive = new CodeBaseDirective( m_codebase,
m_values );
- assertEquals( "codebase", m_codebase, directive.getCodeBaseURI() );
- }
-
- /**
- * Test value directive accessor.
- * @exception Exception if an error occurs during setup.
- */
- public void testGetValues() throws Exception
- {
- CodeBaseDirective directive = new CodeBaseDirective( m_codebase,
m_values );
- assertEquals( "values", m_values, directive.getValueDirectives() );
- }
-
- /**
- * Test invalid usage of null codebase in constructor.
- * @exception Exception if an error occurs during setup.
- */
- public void testNullCodebaseInConstructor() throws Exception
- {
- try
- {
- CodeBaseDirective directive = new CodeBaseDirective( null,
m_values );
- fail( "NPE expected" );
- }
- catch( NullPointerException e )
- {
- // success
- }
- }
-
- /**
- * Test invalid usage of null value in constructor.
- * @exception Exception if an error occurs during setup.
- */
- public void testNullValuesInConstructor() throws Exception
- {
- try
- {
- CodeBaseDirective directive = new CodeBaseDirective( m_codebase,
null );
- fail( "NPE expected" );
- }
- catch( NullPointerException e )
- {
- // success
- }
- }
-
- /**
- * Test serialization.
- * @exception Exception if an error occurs during setup.
- */
- public void testSerialization() throws Exception
- {
- CodeBaseDirective directive = new CodeBaseDirective( m_codebase,
m_values );
- doSerializationTest( directive );
- }
-}

Modified:
trunk/main/transit/core/src/test/dpml/transit/info/HostDirectiveTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/HostDirectiveTestCase.java
2007-01-10 20:29:19 UTC (rev 1810)
+++
trunk/main/transit/core/src/test/dpml/transit/info/HostDirectiveTestCase.java
2007-02-09 01:19:15 UTC (rev 1847)
@@ -16,7 +16,7 @@
* limitations under the License.
*/

-package net.dpml.transit.info;
+package dpml.transit.info;

/**
* Testing the CodeBaseDirective class.

Deleted:
trunk/main/transit/core/src/test/dpml/transit/info/LayoutDirectiveTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/LayoutDirectiveTestCase.java
2007-01-10 20:29:19 UTC (rev 1810)
+++
trunk/main/transit/core/src/test/dpml/transit/info/LayoutDirectiveTestCase.java
2007-02-09 01:19:15 UTC (rev 1847)
@@ -1,109 +0,0 @@
-/*
- * Copyright 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.transit.info;
-
-import java.net.URI;
-
-import net.dpml.lang.ValueDirective;
-
-/**
- * Testing the CodeBaseDirective class.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public final class LayoutDirectiveTestCase extends CodeBaseDirectiveTestCase
-{
- private String m_id = "test";
- private String m_title = "title";
-
- /**
- * Test id accessor.
- * @exception Exception if an error occurs
- */
- public void testID() throws Exception
- {
- URI codebase = getCodebaseValue();
- ValueDirective[] values = getValueDirectives();
- LayoutDirective directive =
- new LayoutDirective( m_id, m_title, codebase, values );
-
- assertEquals( "id", m_id, directive.getID() );
- }
-
- /**
- * Test title accessor.
- * @exception Exception if an error occurs
- */
- public void testTitle() throws Exception
- {
- URI codebase = getCodebaseValue();
- ValueDirective[] values = getValueDirectives();
- LayoutDirective directive =
- new LayoutDirective( m_id, m_title, codebase, values );
-
- assertEquals( "title", m_title, directive.getTitle() );
- }
-
- /**
- * Test invalid null id in constructor.
- * @exception Exception if an error occurs
- */
- public void testNullID() throws Exception
- {
- URI codebase = getCodebaseValue();
- ValueDirective[] values = getValueDirectives();
- try
- {
- LayoutDirective directive =
- new LayoutDirective( null, m_title, codebase, values );
- fail( "NPE expected" );
- }
- catch( NullPointerException e )
- {
- // success
- }
- }
-
- /**
- * Test null title in constructor.
- * @exception Exception if an error occurs
- */
- public void testNullTitle() throws Exception
- {
- URI codebase = getCodebaseValue();
- ValueDirective[] values = getValueDirectives();
- LayoutDirective directive =
- new LayoutDirective( m_id, null, codebase, values );
- assertEquals( "title", m_id, directive.getTitle() );
- }
-
- /**
- * Test serailization.
- * @exception Exception if an error occurs
- */
- public void testSerialization() throws Exception
- {
- URI codebase = getCodebaseValue();
- ValueDirective[] values = getValueDirectives();
- LayoutDirective directive =
- new LayoutDirective( m_id, m_title, codebase, values );
- doSerializationTest( directive );
- }
-}

Modified:
trunk/main/transit/core/src/test/dpml/transit/info/ProxyDirectiveTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/ProxyDirectiveTestCase.java
2007-01-10 20:29:19 UTC (rev 1810)
+++
trunk/main/transit/core/src/test/dpml/transit/info/ProxyDirectiveTestCase.java
2007-02-09 01:19:15 UTC (rev 1847)
@@ -16,7 +16,7 @@
* limitations under the License.
*/

-package net.dpml.transit.info;
+package dpml.transit.info;

/**
* Testing the CodeBaseDirective class.

Modified:
trunk/main/transit/core/src/test/dpml/transit/info/TransitDirectiveTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/TransitDirectiveTestCase.java
2007-01-10 20:29:19 UTC (rev 1810)
+++
trunk/main/transit/core/src/test/dpml/transit/info/TransitDirectiveTestCase.java
2007-02-09 01:19:15 UTC (rev 1847)
@@ -16,7 +16,7 @@
* limitations under the License.
*/

-package net.dpml.transit.info;
+package dpml.transit.info;

/**
* Testing the CodeBaseDirective class.
@@ -28,6 +28,7 @@
{
private CacheDirective m_cache;
private ProxyDirective m_proxy;
+ private String[] m_extensions;
private TransitDirective m_directive;

/**
@@ -43,10 +44,8 @@
m_cache =
new CacheDirective(
"${dpml.data}/cache", "classic", "${dpml.share}/local",
"modern",
- new LayoutDirective[0], new HostDirective[0] );
- m_directive =
- new TransitDirective(
- m_proxy, m_cache );
+ new HostDirective[0] );
+ m_directive = new TransitDirective( m_proxy, m_cache );
}

/**
@@ -66,7 +65,7 @@
{
assertEquals( "cache", m_cache, m_directive.getCacheDirective() );
}
-
+
/**
* Test directive serialization.
* @exception Exception if an error occurs

Deleted:
trunk/main/transit/core/src/test/dpml/transit/info/ValueDirectiveTestCase.java
===================================================================
---
trunk/main/transit/core/src/test/net/dpml/transit/info/ValueDirectiveTestCase.java
2007-01-10 20:29:19 UTC (rev 1810)
+++
trunk/main/transit/core/src/test/dpml/transit/info/ValueDirectiveTestCase.java
2007-02-09 01:19:15 UTC (rev 1847)
@@ -1,207 +0,0 @@
-/*
- * Copyright 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.transit.info;
-
-import java.io.File;
-
-import net.dpml.lang.Construct;
-import net.dpml.lang.ValueDirective;
-
-/**
- * Testing the ValueDirective class.
- *
- * @author <a href="@PUBLISHER-URL@">@PUBLISHER-NAME@</a>
- * @version @PROJECT-VERSION@
- */
-public final class ValueDirectiveTestCase extends AbstractTestCase
-{
- /**
- * Validate the creation of a value directrive using a single null
argument
- * and the resolution of the value by a Construct to a null.
- * @exception Exception if an error occurs
- */
- public void testNullValue() throws Exception
- {
- try
- {
- ValueDirective value = new ValueDirective( null );
- Construct construct = new Construct( value );
- assertEquals( null, construct.resolve() );
- }
- catch( NullPointerException e )
- {
- fail( "Null values allowable." );
- }
- }
-
- /**
- * Validate the creation of a value directrive using a single non-null
- * String argument and the resolution of the value by a construct to the
- * same value.
- * @exception Exception if an error occurs
- */
- public void testValue() throws Exception
- {
- String arg = "test";
- ValueDirective value = new ValueDirective( arg );
- assertFalse( "compound", value.isCompound() );
- assertNull( "method", value.getMethodName() );
- assertEquals( "values", 0, value.getValueDirectives().length );
- assertEquals( "base", arg, value.getBaseValue() );
- assertEquals( "target", null, value.getTargetExpression() );
-
- Construct construct = new Construct( value );
- assertEquals( "resolved", arg, construct.resolve() );
- }
-
- /**
- * Validate the creation of a value directrive using a single non-null
- * String argument that is itself a symbolic reference, and confirm that
- * and the resolution of the value by a construct returns the expected
- * resolve symbol.
- * @exception Exception if an error occurs
- */
- public void testSymbolicValue() throws Exception
- {
- String name = "user.dir";
- String arg = "${" + name + "}";
- ValueDirective value = new ValueDirective( arg );
- Construct construct = new Construct( value );
- String resolved = System.getProperty( name );
- assertEquals( "resolved", resolved, construct.resolve() );
- }
-
- /**
- * Validate the ValueDirective( String target, String value )
constructor.
- * @exception Exception if an error occurs
- */
- public void testTargetValueConstructor() throws Exception
- {
- String target = "java.io.File";
- String value = ".";
- ValueDirective directive = new ValueDirective( target, value );
- assertFalse( "compound", directive.isCompound() );
- assertNull( "method", directive.getMethodName() );
- assertEquals( "values", 0, directive.getValueDirectives().length );
- assertEquals( "base", value, directive.getBaseValue() );
- assertEquals( "target", target, directive.getTargetExpression() );
- Construct construct = new Construct( directive );
- assertEquals( "resolved", new File( value ), construct.resolve() );
- }
-
- /**
- * Validate the ValueDirective( String target, String method, String
value ) constructor.
- * @exception Exception if an error occurs
- */
- public void testTargetMethodValueConstructor() throws Exception
- {
- String target = "java.io.File";
- String value = ".";
- String method = "new";
- ValueDirective directive = new ValueDirective( target, method, value
);
- assertFalse( "compound", directive.isCompound() );
- assertEquals( "method", method, directive.getMethodName() );
- assertEquals( "values", 0, directive.getValueDirectives().length );
- assertEquals( "base", value, directive.getBaseValue() );
- assertEquals( "target", target, directive.getTargetExpression() );
- Construct construct = new Construct( directive );
- assertEquals( "resolved", new File( value ), construct.resolve() );
- }
-
- /**
- * Validate the ValueDirective( String target, ValueDirective[] args )
constructor.
- * @exception Exception if an error occurs
- */
- public void testTargetValuesConstructor() throws Exception
- {
- ValueDirective base = new ValueDirective( "java.io.File", "." );
- ValueDirective spec = new ValueDirective( "test" );
- ValueDirective[] args = new ValueDirective[]{base, spec};
-
- String target = "java.io.File";
- ValueDirective directive = new ValueDirective( target, args );
- assertTrue( "compound", directive.isCompound() );
- assertEquals( "target", target, directive.getTargetExpression() );
- assertNull( "method", directive.getMethodName() );
- assertEquals( "values", args, directive.getValueDirectives() );
- assertNull( "base", directive.getBaseValue() );
- Construct construct = new Construct( directive );
- assertEquals( "resolved", new File( new File( "." ), "test" ),
construct.resolve() );
- }
-
- /**
- * Validate the ValueDirective( String target, String method,
ValueDirective[] args ) constructor.
- * @exception Exception if an error occurs
- */
- public void testTargetMethodValuesConstructor() throws Exception
- {
- ValueDirective base = new ValueDirective( "java.io.File", "." );
- ValueDirective spec = new ValueDirective( "test" );
- ValueDirective[] args = new ValueDirective[]{base, spec};
-
- String target = "java.io.File";
- String method = "new";
- ValueDirective directive = new ValueDirective( target, method, args
);
- assertTrue( "compound", directive.isCompound() );
- assertEquals( "target", target, directive.getTargetExpression() );
- assertEquals( "method", method, directive.getMethodName() );
- assertEquals( "values", args, directive.getValueDirectives() );
- assertNull( "base", directive.getBaseValue() );
- Construct construct = new Construct( directive );
- assertEquals( "resolved", new File( new File( "." ), "test" ),
construct.resolve() );
- }
-
- /**
- * Validate equality operation.
- */
- public void testEquals()
- {
- ValueDirective base = new ValueDirective( "java.io.File", "." );
- ValueDirective spec1 = new ValueDirective( "test" );
- ValueDirective spec2 = new ValueDirective( "test" );
- if( base.equals( spec1 ) )
- {
- fail( "base and spec1 are not the same" );
- }
- if( base.equals( spec2 ) )
- {
- fail( "base and spec2 are not the same" );
- }
- if( !spec1.equals( spec2 ) )
- {
- fail( "spec1 and spec2 are the same" );
- }
- }
-
- /**
- * Test serialization.
- * @exception Exception if an error occurs
- */
- public void testSerialization() throws Exception
- {
- String target = "java.io.File";
- ValueDirective base = new ValueDirective( "java.io.File", "." );
- ValueDirective spec = new ValueDirective( "test" );
- ValueDirective[] args = new ValueDirective[]{base, spec};
- ValueDirective directive = new ValueDirective( target, args );
- doSerializationTest( directive );
- }
-}
-
-




  • r1847 - in trunk/main/transit/core/src/test/dpml/transit: . artifact info, mcconnell at BerliOS, 02/08/2007

Archive powered by MHonArc 2.6.24.

Top of Page