ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant BuildFileTest.java
Date Mon, 14 Jan 2002 00:00:31 GMT
stevel      02/01/13 16:00:30

  Modified:    src/testcases/org/apache/tools/ant BuildFileTest.java
  Log:
  added expect() clauses for properties being set, unset.
  
  Revision  Changes    Path
  1.5       +38 -0     jakarta-ant/src/testcases/org/apache/tools/ant/BuildFileTest.java
  
  Index: BuildFileTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/BuildFileTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BuildFileTest.java	15 Nov 2001 13:33:26 -0000	1.4
  +++ BuildFileTest.java	14 Jan 2002 00:00:30 -0000	1.5
  @@ -219,6 +219,44 @@
           }
           fail("Should throw BuildException because: " + cause);
       }
  +    
  +
  +    /**
  +     * call a target, verify property is as expected
  +     *
  +     * @param target build file target
  +     * @param property property name
  +     * @param value expected value
  +     */
  +
  +    protected void expectPropertySet(String target, String property, String value) {
  +        executeTarget(target);
  +        String result = project.getProperty(property);
  +        assertEquals("property " + property,value,result);
  +    }
  +
  +
  +    /**
  +     * call a target, verify property is "true"
  +     *
  +     * @param target build file target
  +     * @param property property name
  +     */
  +    protected void expectPropertySet(String target, String property) {
  +        expectPropertySet(target, property, "true");
  +    }
  +
  +
  +    /**
  +     * call a target, verify property is null
  +     * @param target build file target
  +     * @param property property name
  +     */
  +    protected void expectPropertyUnset(String target, String property) {
  +        expectPropertySet(target, property, null);
  +    }
  +
  +    
   
       private class AntOutputStream extends java.io.OutputStream { 
           public void write(int b) { 
  
  
  

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


Mime
View raw message