ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/etc/testcases/types addtype.xml
Date Wed, 23 Jul 2003 12:13:59 GMT
peterreilly    2003/07/23 05:13:59

  Modified:    src/testcases/org/apache/tools/ant/types AddTypeTest.java
               src/etc/testcases/types addtype.xml
  Log:
  add tests for addConfigured()
  
  Revision  Changes    Path
  1.3       +29 -1     ant/src/testcases/org/apache/tools/ant/types/AddTypeTest.java
  
  Index: AddTypeTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/types/AddTypeTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AddTypeTest.java	30 May 2003 06:35:41 -0000	1.2
  +++ AddTypeTest.java	23 Jul 2003 12:13:58 -0000	1.3
  @@ -118,7 +118,11 @@
               "condition.condition.task", "task masking condition",
               "doesn't support the nested");
       }
  -    
  +
  +    public void testAddConfigured() {
  +        expectLogContaining(
  +            "myaddconfigured", "value is Value Setexecute: value is Value Set");
  +    }
       // The following will be used as types and tasks
       
       public static interface A {}
  @@ -158,6 +162,30 @@
           }
           public void execute() {
               project.log("My Condition execution");
  +        }
  +    }
  +
  +    public static class MyValue
  +    {
  +        private String text = "NOT SET YET";
  +        public void addText(String text) {
  +            this.text = text;
  +        }
  +        public String toString() {
  +            return text;
  +        }
  +    }
  +
  +    public static class MyAddConfigured
  +        extends Task
  +    {
  +        MyValue value;
  +        public void addConfigured(MyValue value) {
  +            log("value is " + value);
  +            this.value = value;
  +        }
  +        public void execute() {
  +            log("execute: value is " + value);
           }
       }
   
  
  
  
  1.2       +12 -0     ant/src/etc/testcases/types/addtype.xml
  
  Index: addtype.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/types/addtype.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- addtype.xml	28 May 2003 16:27:30 -0000	1.1
  +++ addtype.xml	23 Jul 2003 12:13:58 -0000	1.2
  @@ -64,6 +64,12 @@
       <typedef loaderref="nested.loader" classpathref="nested.classes"
                name = "nested.condition.type" 
                classname="${nested.package}AddTypeTest$MyCondition"/>
  +    <typedef loaderref="nested.loader" classpathref="nested.classes"
  +             name = "myaddconfigured" 
  +             classname="${nested.package}AddTypeTest$MyAddConfigured"/>
  +    <typedef loaderref="nested.loader" classpathref="nested.classes"
  +             name = "myvalue" 
  +             classname="${nested.package}AddTypeTest$MyValue"/>
    </target>
   
     <target name="nested.a" depends="init">
  @@ -110,6 +116,12 @@
       <condition property="condition.condition.task">>
         <nested.condition.task/>
       </condition>
  +  </target>
  +
  +  <target name="myaddconfigured" depends="init">
  +    <myaddconfigured>
  +      <myvalue>Value Set</myvalue>
  +    </myaddconfigured>
     </target>
   
   </project>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message