commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tobr...@apache.org
Subject cvs commit: jakarta-commons/jexl/src/java/org/apache/commons/jexl/junit package.html Asserter.java
Date Sun, 13 Jun 2004 01:39:47 GMT
tobrien     2004/06/12 18:39:47

  Modified:    jexl/src/java/org/apache/commons/jexl/junit Asserter.java
  Added:       jexl/src/java/org/apache/commons/jexl/junit package.html
  Log:
  Fixed typo in Asserter and added a package.html to the jexl.junit package
  
  Revision  Changes    Path
  1.4       +3 -4      jakarta-commons/jexl/src/java/org/apache/commons/jexl/junit/Asserter.java
  
  Index: Asserter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jexl/src/java/org/apache/commons/jexl/junit/Asserter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Asserter.java	28 Feb 2004 13:45:20 -0000	1.3
  +++ Asserter.java	13 Jun 2004 01:39:47 -0000	1.4
  @@ -39,11 +39,10 @@
       private Map variables = new HashMap();
       private JexlContext context = JexlHelper.createContext();
   
  -    public Asserter() {
  -    }
  +    public Asserter() {}
   
       /**
  -     * This consstructor will register the given variableValue as the
  +     * This constructor will register the given variableValue as the
        * "this" variable.
        * 
        * @param variableValue
  
  
  
  1.1                  jakarta-commons/jexl/src/java/org/apache/commons/jexl/junit/package.html
  
  Index: package.html
  ===================================================================
  <html>
   <head>
    <title>Package Documentation for org.apache.commons.jexl.junit Package</title>
   </head>
   <body bgcolor="white">
    Using JEXL expressions in JUnit assertions
    <br><br>
    <p>
     <ul>
      <li><a href="#intro">Introduction</a></li>
     </ul>
    </p>
    <h2><a name="intro">Introduction</a></h2>
    <p>
     This package only contains one class, Asserter, which
     allows you to use a JEXL expression in a JUnit assertion.
     The following example demonstrates the use of the Asserter
     class.  An instance is created, and the internal JexlContext
     is populated via calls to setVariable().  Calls to 
     assertExpression() succeed if the expression evaluates to
     the value of the second parameter, otherwise an 
     AssertionFailedException is thrown.
    </p>
    
    <pre>
     Asserter asserter = new Asserter();
     asserter.setVariable("foo", new Foo());
     asserter.setVariable("person", "James");
  
     asserter.assertExpression("person", "James");
     asserter.assertExpression("size(person)", new Integer(5));
          
     asserter.assertExpression("foo.getCount()", new Integer(5));
     asserter.assertExpression("foo.count", new Integer(5));
    </pre>
  </body>
  </html>
  
  
  

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


Mime
View raw message