commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons-sandbox/pattern/src/test/org/apache/commons/pattern/predicate TestPredicateUtils.java PredicateTestSuite.java
Date Sat, 29 Jun 2002 12:51:10 GMT
scolebourne    2002/06/29 05:51:10

  Added:       pattern/src/test/org/apache/commons/pattern/predicate
                        TestPredicateUtils.java PredicateTestSuite.java
  Log:
  Initial checkin
  
  Revision  Changes    Path
  1.1                  jakarta-commons-sandbox/pattern/src/test/org/apache/commons/pattern/predicate/TestPredicateUtils.java
  
  Index: TestPredicateUtils.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.commons.pattern.predicate;
  
  import java.io.Serializable;
  import java.util.Date;
  
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  import org.apache.commons.lang.SerializationException;
  /**
   * Tests the org.apache.commons.pattern.predicate.PredicateUtils class.
   *
   * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
   * @version $Id: TestPredicateUtils.java,v 1.1 2002/06/29 12:51:10 scolebourne Exp $
   */
  public class TestPredicateUtils extends junit.framework.TestCase {
  
      private static final Object cObject = new Object();
      private static final Object cString = "Hello";
      private static final Object cInteger = new Integer(6);
  
      /**
       * Construct
       */
      public TestPredicateUtils(String name) {
          super(name);
      }
  
      /**
       * Return class aa a test suite.
       */
      public static Test suite() {
          return new TestSuite(TestPredicateUtils.class);
      }
  
      /**
       * Set up instance variables required by this test case.
       */
      public void setUp() {
      }
  
      /**
       * Tear down instance variables required by this test case.
       */
      public void tearDown() {
      }
  
      // nullPredicate
      //------------------------------------------------------------------
  
      public void testNullPredicate() {
          assertNotNull(PredicateUtils.NULL_PREDICATE);
          assertSame(PredicateUtils.NULL_PREDICATE, PredicateUtils.nullPredicate());
          assertEquals(true, PredicateUtils.NULL_PREDICATE.evaluate(null));
          assertEquals(false, PredicateUtils.NULL_PREDICATE.evaluate(cObject));
          assertEquals(false, PredicateUtils.NULL_PREDICATE.evaluate(cString));
          assertEquals(false, PredicateUtils.NULL_PREDICATE.evaluate(cInteger));
      }
  
      // notNullPredicate
      //------------------------------------------------------------------
  
      public void testIsNotNullPredicate() {
          assertNotNull(PredicateUtils.NOT_NULL_PREDICATE);
          assertSame(PredicateUtils.NOT_NULL_PREDICATE, PredicateUtils.notNullPredicate());
          assertEquals(false, PredicateUtils.NOT_NULL_PREDICATE.evaluate(null));
          assertEquals(true, PredicateUtils.NOT_NULL_PREDICATE.evaluate(cObject));
          assertEquals(true, PredicateUtils.NOT_NULL_PREDICATE.evaluate(cString));
          assertEquals(true, PredicateUtils.NOT_NULL_PREDICATE.evaluate(cInteger));
      }
  
      // equalPredicate
      //------------------------------------------------------------------
  
      public void testEqualPredicate() {
          assertSame(PredicateUtils.NULL_PREDICATE, PredicateUtils.equalPredicate(null));
          assertNotNull(PredicateUtils.equalPredicate(new Integer(6)));
          assertEquals(false, PredicateUtils.equalPredicate(new Integer(6)).evaluate(null));
          assertEquals(false, PredicateUtils.equalPredicate(new Integer(6)).evaluate(cObject));
          assertEquals(false, PredicateUtils.equalPredicate(new Integer(6)).evaluate(cString));
          assertEquals(true, PredicateUtils.equalPredicate(new Integer(6)).evaluate(cInteger));
      }
  
      // identityPredicate
      //------------------------------------------------------------------
  
      public void testIdentityPredicate() {
          assertSame(PredicateUtils.NULL_PREDICATE, PredicateUtils.identityPredicate(null));
          assertNotNull(PredicateUtils.identityPredicate(new Integer(6)));
          assertEquals(false, PredicateUtils.identityPredicate(new Integer(6)).evaluate(null));
          assertEquals(false, PredicateUtils.identityPredicate(new Integer(6)).evaluate(cObject));
          assertEquals(false, PredicateUtils.identityPredicate(new Integer(6)).evaluate(cString));
          assertEquals(false, PredicateUtils.identityPredicate(new Integer(6)).evaluate(cInteger));
          assertEquals(true, PredicateUtils.identityPredicate(cInteger).evaluate(cInteger));
      }
  
      // truePredicate
      //------------------------------------------------------------------
  
      public void testTruePredicate() {
          assertNotNull(PredicateUtils.TRUE_PREDICATE);
          assertSame(PredicateUtils.TRUE_PREDICATE, PredicateUtils.truePredicate());
          assertEquals(true, PredicateUtils.TRUE_PREDICATE.evaluate(null));
          assertEquals(true, PredicateUtils.TRUE_PREDICATE.evaluate(cObject));
          assertEquals(true, PredicateUtils.TRUE_PREDICATE.evaluate(cString));
          assertEquals(true, PredicateUtils.TRUE_PREDICATE.evaluate(cInteger));
      }
  
      // falsePredicate
      //------------------------------------------------------------------
  
      public void testFalsePredicate() {
          assertNotNull(PredicateUtils.FALSE_PREDICATE);
          assertSame(PredicateUtils.FALSE_PREDICATE, PredicateUtils.falsePredicate());
          assertEquals(false, PredicateUtils.FALSE_PREDICATE.evaluate(null));
          assertEquals(false, PredicateUtils.FALSE_PREDICATE.evaluate(cObject));
          assertEquals(false, PredicateUtils.FALSE_PREDICATE.evaluate(cString));
          assertEquals(false, PredicateUtils.FALSE_PREDICATE.evaluate(cInteger));
      }
  
      // notPredicate
      //------------------------------------------------------------------
  
      public void testNotPredicate() {
          assertNotNull(PredicateUtils.notPredicate(PredicateUtils.TRUE_PREDICATE));
          assertEquals(false, PredicateUtils.notPredicate(PredicateUtils.TRUE_PREDICATE).evaluate(null));
          assertEquals(false, PredicateUtils.notPredicate(PredicateUtils.TRUE_PREDICATE).evaluate(cObject));
          assertEquals(false, PredicateUtils.notPredicate(PredicateUtils.TRUE_PREDICATE).evaluate(cString));
          assertEquals(false, PredicateUtils.notPredicate(PredicateUtils.TRUE_PREDICATE).evaluate(cInteger));
      }
      
      public void testNotPredicateEx() {
          try {
              PredicateUtils.notPredicate(null);
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      // andPredicate
      //------------------------------------------------------------------
  
      public void testAndPredicate() {
          assertEquals(true, PredicateUtils.andPredicate(PredicateUtils.TRUE_PREDICATE, PredicateUtils.TRUE_PREDICATE).evaluate(null));
          assertEquals(false, PredicateUtils.andPredicate(PredicateUtils.TRUE_PREDICATE, PredicateUtils.FALSE_PREDICATE).evaluate(null));
          assertEquals(false, PredicateUtils.andPredicate(PredicateUtils.FALSE_PREDICATE,
PredicateUtils.TRUE_PREDICATE).evaluate(null));
          assertEquals(false, PredicateUtils.andPredicate(PredicateUtils.FALSE_PREDICATE,
PredicateUtils.FALSE_PREDICATE).evaluate(null));
      }
  
      public void testAndPredicateEx() {
          try {
              PredicateUtils.andPredicate(null, null);
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      // allPredicate
      //------------------------------------------------------------------
  
      public void testAllPredicate() {
          assertEquals(true, PredicateUtils.allPredicate(new Predicate[] {
              PredicateUtils.TRUE_PREDICATE, PredicateUtils.TRUE_PREDICATE, PredicateUtils.TRUE_PREDICATE}).evaluate(null));
          assertEquals(false, PredicateUtils.allPredicate(new Predicate[] {
              PredicateUtils.TRUE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.TRUE_PREDICATE}).evaluate(null));
          assertEquals(false, PredicateUtils.allPredicate(new Predicate[] {
              PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.TRUE_PREDICATE}).evaluate(null));
          assertEquals(false, PredicateUtils.allPredicate(new Predicate[] {
              PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE}).evaluate(null));
      }
  
      public void testAllPredicateEx1() {
          try {
              PredicateUtils.allPredicate(null);
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      public void testAllPredicateEx2() {
          try {
              PredicateUtils.allPredicate(new Predicate[] {null});
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      public void testAllPredicateEx3() {
          try {
              PredicateUtils.allPredicate(new Predicate[] {null, null});
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      // orPredicate
      //------------------------------------------------------------------
  
      public void testOrPredicate() {
          assertEquals(true, PredicateUtils.orPredicate(PredicateUtils.TRUE_PREDICATE, PredicateUtils.TRUE_PREDICATE).evaluate(null));
          assertEquals(true, PredicateUtils.orPredicate(PredicateUtils.TRUE_PREDICATE, PredicateUtils.FALSE_PREDICATE).evaluate(null));
          assertEquals(true, PredicateUtils.orPredicate(PredicateUtils.FALSE_PREDICATE, PredicateUtils.TRUE_PREDICATE).evaluate(null));
          assertEquals(false, PredicateUtils.orPredicate(PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE).evaluate(null));
      }
      
      public void testOrPredicateEx() {
          try {
              PredicateUtils.orPredicate(null, null);
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      // anyPredicate
      //------------------------------------------------------------------
  
      public void testAnyPredicate() {
          assertEquals(true, PredicateUtils.anyPredicate(new Predicate[] {
              PredicateUtils.TRUE_PREDICATE, PredicateUtils.TRUE_PREDICATE, PredicateUtils.TRUE_PREDICATE}).evaluate(null));
          assertEquals(true, PredicateUtils.anyPredicate(new Predicate[] {
              PredicateUtils.TRUE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.TRUE_PREDICATE}).evaluate(null));
          assertEquals(true, PredicateUtils.anyPredicate(new Predicate[] {
              PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.TRUE_PREDICATE}).evaluate(null));
          assertEquals(false, PredicateUtils.anyPredicate(new Predicate[] {
              PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE}).evaluate(null));
      }
  
      public void testAnyPredicateEx1() {
          try {
              PredicateUtils.anyPredicate(null);
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      public void testAnyPredicateEx2() {
          try {
              PredicateUtils.anyPredicate(new Predicate[] {null});
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      public void testAnyPredicateEx3() {
          try {
              PredicateUtils.anyPredicate(new Predicate[] {null, null});
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      // eitherPredicate
      //------------------------------------------------------------------
  
      public void testEitherPredicate() {
          assertEquals(false, PredicateUtils.eitherPredicate(PredicateUtils.TRUE_PREDICATE,
PredicateUtils.TRUE_PREDICATE).evaluate(null));
          assertEquals(true, PredicateUtils.eitherPredicate(PredicateUtils.TRUE_PREDICATE,
PredicateUtils.FALSE_PREDICATE).evaluate(null));
          assertEquals(true, PredicateUtils.eitherPredicate(PredicateUtils.FALSE_PREDICATE,
PredicateUtils.TRUE_PREDICATE).evaluate(null));
          assertEquals(false, PredicateUtils.eitherPredicate(PredicateUtils.FALSE_PREDICATE,
PredicateUtils.FALSE_PREDICATE).evaluate(null));
      }
  
      public void testEitherPredicateEx() {
          try {
              PredicateUtils.eitherPredicate(null, null);
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      // onePredicate
      //------------------------------------------------------------------
  
      public void testOnePredicate() {
          assertEquals(false, PredicateUtils.onePredicate(new Predicate[] {
              PredicateUtils.TRUE_PREDICATE, PredicateUtils.TRUE_PREDICATE, PredicateUtils.TRUE_PREDICATE}).evaluate(null));
          assertEquals(false, PredicateUtils.onePredicate(new Predicate[] {
              PredicateUtils.TRUE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.TRUE_PREDICATE}).evaluate(null));
          assertEquals(true, PredicateUtils.onePredicate(new Predicate[] {
              PredicateUtils.TRUE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE}).evaluate(null));
          assertEquals(true, PredicateUtils.onePredicate(new Predicate[] {
              PredicateUtils.FALSE_PREDICATE, PredicateUtils.TRUE_PREDICATE, PredicateUtils.FALSE_PREDICATE}).evaluate(null));
          assertEquals(true, PredicateUtils.onePredicate(new Predicate[] {
              PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.TRUE_PREDICATE}).evaluate(null));
          assertEquals(false, PredicateUtils.onePredicate(new Predicate[] {
              PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE}).evaluate(null));
      }
  
      public void testOnePredicateEx1() {
          try {
              PredicateUtils.onePredicate(null);
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      public void testOnePredicateEx2() {
          try {
              PredicateUtils.onePredicate(new Predicate[] {null});
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      public void testOnePredicateEx3() {
          try {
              PredicateUtils.onePredicate(new Predicate[] {null, null});
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      // neitherPredicate
      //------------------------------------------------------------------
  
      public void testNeitherPredicate() {
          assertEquals(false, PredicateUtils.neitherPredicate(PredicateUtils.TRUE_PREDICATE,
PredicateUtils.TRUE_PREDICATE).evaluate(null));
          assertEquals(false, PredicateUtils.neitherPredicate(PredicateUtils.TRUE_PREDICATE,
PredicateUtils.FALSE_PREDICATE).evaluate(null));
          assertEquals(false, PredicateUtils.neitherPredicate(PredicateUtils.FALSE_PREDICATE,
PredicateUtils.TRUE_PREDICATE).evaluate(null));
          assertEquals(true, PredicateUtils.neitherPredicate(PredicateUtils.FALSE_PREDICATE,
PredicateUtils.FALSE_PREDICATE).evaluate(null));
      }
  
      public void testNeitherPredicateEx() {
          try {
              PredicateUtils.neitherPredicate(null, null);
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      // nonePredicate
      //------------------------------------------------------------------
  
      public void testNonePredicate() {
          assertEquals(false, PredicateUtils.nonePredicate(new Predicate[] {
              PredicateUtils.TRUE_PREDICATE, PredicateUtils.TRUE_PREDICATE, PredicateUtils.TRUE_PREDICATE}).evaluate(null));
          assertEquals(false, PredicateUtils.nonePredicate(new Predicate[] {
              PredicateUtils.TRUE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.TRUE_PREDICATE}).evaluate(null));
          assertEquals(false, PredicateUtils.nonePredicate(new Predicate[] {
              PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.TRUE_PREDICATE}).evaluate(null));
          assertEquals(true, PredicateUtils.nonePredicate(new Predicate[] {
              PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE, PredicateUtils.FALSE_PREDICATE}).evaluate(null));
      }
  
      public void testNonePredicateEx1() {
          try {
              PredicateUtils.nonePredicate(null);
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      public void testNonePredicateEx2() {
          try {
              PredicateUtils.nonePredicate(new Predicate[] {null});
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      public void testNonePredicateEx3() {
          try {
              PredicateUtils.nonePredicate(new Predicate[] {null, null});
          } catch (IllegalArgumentException ex) {
              return;
          }
          fail();
      }
      
      // instanceofPredicate
      //------------------------------------------------------------------
  
      public void testInstanceOfPredicate() {
          assertNotNull(PredicateUtils.instanceofPredicate(String.class));
          assertEquals(false, PredicateUtils.instanceofPredicate(String.class).evaluate(null));
          assertEquals(false, PredicateUtils.instanceofPredicate(String.class).evaluate(cObject));
          assertEquals(true, PredicateUtils.instanceofPredicate(String.class).evaluate(cString));
          assertEquals(false, PredicateUtils.instanceofPredicate(String.class).evaluate(cInteger));
      }
  
      // uniquePredicate
      //------------------------------------------------------------------
  
      public void testUniquePredicate() {
          Predicate p = PredicateUtils.uniquePredicate();
          assertEquals(true, p.evaluate(new Object()));
          assertEquals(true, p.evaluate(new Object()));
          assertEquals(true, p.evaluate(new Object()));
          assertEquals(true, p.evaluate(cString));
          assertEquals(false, p.evaluate(cString));
          assertEquals(false, p.evaluate(cString));
      }
  }
  
  
  
  1.1                  jakarta-commons-sandbox/pattern/src/test/org/apache/commons/pattern/predicate/PredicateTestSuite.java
  
  Index: PredicateTestSuite.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Commons", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.commons.pattern.predicate;
  
  import junit.framework.Test;
  import junit.framework.TestCase;
  import junit.framework.TestSuite;
  import junit.textui.TestRunner;
  /**
   * Test suite for the Predicate pattern package.
   *
   * @author <a href="mailto:scolebourne@joda.org">Stephen Colebourne</a>
   * @version $Id: PredicateTestSuite.java,v 1.1 2002/06/29 12:51:10 scolebourne Exp $
   */
  public class PredicateTestSuite extends TestCase {
      
      /**
       * Construct a new instance.
       */
      public PredicateTestSuite(String name) {
          super(name);
      }
  
      /**
       * Command-line interface.
       */
      public static void main(String[] args) {
          TestRunner.run(suite());
      }
  
      /**
       * Get the suite of tests
       */
      public static Test suite() {
          TestSuite suite = new TestSuite();
          suite.addTest(TestPredicateUtils.suite());
          return suite;
      }
  }
  
  
  

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


Mime
View raw message