Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq.filter
Class MultiExpressionEvaluatorTest  view MultiExpressionEvaluatorTest download MultiExpressionEvaluatorTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.activemq.filter.MultiExpressionEvaluatorTest
All Implemented Interfaces:
junit.framework.Test

public class MultiExpressionEvaluatorTest
extends junit.framework.TestCase

Test cases for the MultiExpressionEvaluator class.


Field Summary
(package private)  MultiExpressionEvaluator evaluator
           
(package private)  java.util.ArrayList expressions
           
static int SPEED_TEST_ITERATIONS
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
MultiExpressionEvaluatorTest()
           
 
Method Summary
protected  Expression parse(java.lang.String text)
           
private  Expression parseFalse(java.lang.String string)
           
private  Expression parseTrue(java.lang.String string)
           
private  void printSpeedReport(java.lang.String testName, long start, long end)
           
protected  void setUp()
          Sets up the fixture, for example, open a network connection.
 void testSimpleEvaluation()
          There are 3 expression that are true in the expressions list.
 void testSpeedNotUsingMultiExpressionEvaluator()
           
 void testSpeedUsingMultiExpressionEvaluator()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

evaluator

MultiExpressionEvaluator evaluator

expressions

java.util.ArrayList expressions

SPEED_TEST_ITERATIONS

public static final int SPEED_TEST_ITERATIONS
See Also:
Constant Field Values
Constructor Detail

MultiExpressionEvaluatorTest

public MultiExpressionEvaluatorTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Description copied from class: junit.framework.TestCase
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.


parseTrue

private Expression parseTrue(java.lang.String string)
                      throws java.lang.Exception

parseFalse

private Expression parseFalse(java.lang.String string)
                       throws java.lang.Exception

parse

protected Expression parse(java.lang.String text)
                    throws java.lang.Exception

testSimpleEvaluation

public void testSimpleEvaluation()
There are 3 expression that are true in the expressions list. test them all and see if the count is right.


testSpeedUsingMultiExpressionEvaluator

public void testSpeedUsingMultiExpressionEvaluator()

testSpeedNotUsingMultiExpressionEvaluator

public void testSpeedNotUsingMultiExpressionEvaluator()

printSpeedReport

private void printSpeedReport(java.lang.String testName,
                              long start,
                              long end)