ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant IntrospectionHelperTest.java
Date Thu, 05 Jul 2001 12:03:48 GMT
bodewig     01/07/05 05:03:48

  Modified:    src/testcases/org/apache/tools/ant
                        IntrospectionHelperTest.java
  Log:
  some method signatures in IntrospectionHelper have changed.
  
  Revision  Changes    Path
  1.7       +14 -9     jakarta-ant/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java
  
  Index: IntrospectionHelperTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- IntrospectionHelperTest.java	2001/05/22 09:20:17	1.6
  +++ IntrospectionHelperTest.java	2001/07/05 12:03:47	1.7
  @@ -67,24 +67,31 @@
   
   public class IntrospectionHelperTest extends TestCase {
   
  +    private Project p;
  +
       public static boolean isUnixStyle = File.pathSeparatorChar == ':';
   
       public IntrospectionHelperTest(String name) {
           super(name);
       }
       
  +    public void setUp() {
  +        p = new Project();
  +        p.setBasedir("/tmp");
  +    }
  +
       public void testAddText() throws BuildException {
           IntrospectionHelper ih = IntrospectionHelper.getHelper(java.lang.String.class);
           try {
  -            ih.addText("", "test");
  +            ih.addText(p, "", "test");
               fail("String doesn\'t support addText");
           } catch (BuildException be) {
           }
   
           ih = IntrospectionHelper.getHelper(getClass());
  -        ih.addText(this, "test");
  +        ih.addText(p, this, "test");
           try {
  -            ih.addText(this, "test2");
  +            ih.addText(p, this, "test2");
               fail("test2 shouldn\'t be equal to test");
           } catch (BuildException be) {
               assert(be.getException() instanceof AssertionFailedError);
  @@ -131,7 +138,7 @@
           } catch (BuildException be) {
           }
           assertEquals(java.lang.String.class, ih.getElementType("six"));
  -        assertEquals("test", ih.createElement(this, "six"));
  +        assertEquals("test", ih.createElement(p, this, "six"));
   
           try {
               ih.getElementType("seven");
  @@ -164,17 +171,17 @@
           } catch (BuildException be) {
           }
           assertEquals(java.lang.StringBuffer.class, ih.getElementType("thirteen"));
  -        assertEquals("test", ih.createElement(this, "thirteen").toString());
  +        assertEquals("test", ih.createElement(p, this, "thirteen").toString());
   
           try {
  -            ih.createElement(this, "fourteen");
  +            ih.createElement(p, this, "fourteen");
               fail("fourteen throws NullPointerException");
           } catch (BuildException be) {
               assert(be.getException() instanceof NullPointerException);
           }
   
           try {
  -            ih.createElement(this, "fourteen");
  +            ih.createElement(p, this, "fourteen");
               fail("fifteen throws NullPointerException");
           } catch (BuildException be) {
               assert(be.getException() instanceof NullPointerException);
  @@ -245,8 +252,6 @@
       }
   
       public void testAttributeSetters() throws BuildException {
  -        Project p = new Project();
  -        p.setBasedir("/tmp");
           IntrospectionHelper ih = IntrospectionHelper.getHelper(getClass());
           try {
               ih.setAttribute(p, this, "one", "test");
  
  
  

Mime
View raw message