Browse Source

Migrated self testing code to new library.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269184 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
7a89b85adb
4 changed files with 24 additions and 24 deletions
  1. +6
    -6
      proposal/myrmidon/src/java/org/apache/myrmidon/libs/selftest/ConfigurationTest.java
  2. +3
    -3
      proposal/myrmidon/src/java/org/apache/myrmidon/libs/selftest/ContentTest.java
  3. +11
    -11
      proposal/myrmidon/src/java/org/apache/myrmidon/libs/selftest/PrimitiveTypesTest.java
  4. +4
    -4
      proposal/myrmidon/src/java/org/apache/myrmidon/libs/selftest/SubElementTest.java

proposal/myrmidon/src/java/org/apache/ant/modules/test/ConfigurationTest.java → proposal/myrmidon/src/java/org/apache/myrmidon/libs/selftest/ConfigurationTest.java View File

@@ -5,20 +5,20 @@
* version 1.1, a copy of which has been included with this distribution in * version 1.1, a copy of which has been included with this distribution in
* the LICENSE file. * the LICENSE file.
*/ */
package org.apache.ant.modules.test;
package org.apache.myrmidon.libs.selftest;


import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.Configurable; import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException; import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;


/** /**
* This is to test self interpretation of configuration. * This is to test self interpretation of configuration.
* *
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a> * @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
*/ */
public class ConfigurationTest
public class ConfigurationTest
extends AbstractTask extends AbstractTask
implements Configurable implements Configurable
{ {
@@ -28,7 +28,7 @@ public class ConfigurationTest
throws ConfigurationException throws ConfigurationException
{ {
String message = configuration.getAttribute( "message" ); String message = configuration.getAttribute( "message" );
Object object = null; Object object = null;


try { object = getContext().resolveValue( message ); } try { object = getContext().resolveValue( message ); }

proposal/myrmidon/src/java/org/apache/ant/modules/test/ContentTest.java → proposal/myrmidon/src/java/org/apache/myrmidon/libs/selftest/ContentTest.java View File

@@ -5,17 +5,17 @@
* version 1.1, a copy of which has been included with this distribution in * version 1.1, a copy of which has been included with this distribution in
* the LICENSE file. * the LICENSE file.
*/ */
package org.apache.ant.modules.test;
package org.apache.myrmidon.libs.selftest;


import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.AbstractTask; import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;


/** /**
* This is to test whether content is added. * This is to test whether content is added.
* *
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a> * @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
*/ */
public class ContentTest
public class ContentTest
extends AbstractTask extends AbstractTask
{ {
public void addContent( final Integer value ) public void addContent( final Integer value )

proposal/myrmidon/src/java/org/apache/ant/modules/test/PrimitiveTypesTest.java → proposal/myrmidon/src/java/org/apache/myrmidon/libs/selftest/PrimitiveTypesTest.java View File

@@ -5,24 +5,24 @@
* version 1.1, a copy of which has been included with this distribution in * version 1.1, a copy of which has been included with this distribution in
* the LICENSE file. * the LICENSE file.
*/ */
package org.apache.ant.modules.test;
package org.apache.myrmidon.libs.selftest;


import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.AbstractTask; import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;


/** /**
* Test conversion of all the primitive types. * Test conversion of all the primitive types.
* *
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a> * @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
*/ */
public class PrimitiveTypesTest
public class PrimitiveTypesTest
extends AbstractTask extends AbstractTask
{ {
public void setInteger( final Integer value ) public void setInteger( final Integer value )
{ {
getLogger().warn( "setInteger( " + value + " );" ); getLogger().warn( "setInteger( " + value + " );" );
} }
public void setInteger2( final int value ) public void setInteger2( final int value )
{ {
getLogger().warn( "setInteger2( " + value + " );" ); getLogger().warn( "setInteger2( " + value + " );" );
@@ -32,7 +32,7 @@ public class PrimitiveTypesTest
{ {
getLogger().warn( "setShort( " + value + " );" ); getLogger().warn( "setShort( " + value + " );" );
} }
public void setShort2( final short value ) public void setShort2( final short value )
{ {
getLogger().warn( "setShort2( " + value + " );" ); getLogger().warn( "setShort2( " + value + " );" );
@@ -42,7 +42,7 @@ public class PrimitiveTypesTest
{ {
getLogger().warn( "setByte( " + value + " );" ); getLogger().warn( "setByte( " + value + " );" );
} }
public void setByte2( final byte value ) public void setByte2( final byte value )
{ {
getLogger().warn( "setByte2( " + value + " );" ); getLogger().warn( "setByte2( " + value + " );" );
@@ -52,27 +52,27 @@ public class PrimitiveTypesTest
{ {
getLogger().warn( "setLong( " + value + " );" ); getLogger().warn( "setLong( " + value + " );" );
} }
public void setLong2( final long value ) public void setLong2( final long value )
{ {
getLogger().warn( "setLong2( " + value + " );" ); getLogger().warn( "setLong2( " + value + " );" );
} }
public void setFloat( final Float value ) public void setFloat( final Float value )
{ {
getLogger().warn( "setFloat( " + value + " );" ); getLogger().warn( "setFloat( " + value + " );" );
} }
public void setFloat2( final float value ) public void setFloat2( final float value )
{ {
getLogger().warn( "setFloat2( " + value + " );" ); getLogger().warn( "setFloat2( " + value + " );" );
} }
public void setDouble( final Double value ) public void setDouble( final Double value )
{ {
getLogger().warn( "setDouble( " + value + " );" ); getLogger().warn( "setDouble( " + value + " );" );
} }
public void setDouble2( final double value ) public void setDouble2( final double value )
{ {
getLogger().warn( "setDouble2( " + value + " );" ); getLogger().warn( "setDouble2( " + value + " );" );

proposal/myrmidon/src/java/org/apache/ant/modules/test/SubElementTest.java → proposal/myrmidon/src/java/org/apache/myrmidon/libs/selftest/SubElementTest.java View File

@@ -5,17 +5,17 @@
* version 1.1, a copy of which has been included with this distribution in * version 1.1, a copy of which has been included with this distribution in
* the LICENSE file. * the LICENSE file.
*/ */
package org.apache.ant.modules.test;
package org.apache.myrmidon.libs.selftest;


import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.AbstractTask; import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;


/** /**
* Test sub-elements addition. * Test sub-elements addition.
*
*
* @author <a href="mailto:donaldp@apache.org">Peter Donald</a> * @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
*/ */
public class SubElementTest
public class SubElementTest
extends AbstractTask extends AbstractTask
{ {
public static final class Beep public static final class Beep

Loading…
Cancel
Save