org.tuckey.web.filters.urlrewrite.test
Class UrlRewriteTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.tuckey.web.filters.urlrewrite.test.UrlRewriteTestCase
All Implemented Interfaces:
junit.framework.Test

public class UrlRewriteTestCase
extends junit.framework.TestCase

The idea for UrlRewriteTestCase is that users can extend it to create their own simple unit tests instead of having to manually setup a mock request and the filter.

note, Ideally this would be in a separate urlrewrite-test.jar but that seems a little over the top for one class.


Constructor Summary
UrlRewriteTestCase()
           
 
Method Summary
 void assertRuleMatches(java.lang.String ruleName, java.lang.String requestUrl)
          Checks to see if the specified rule name matches the url specified.
 void loadConf(java.net.URL confFileUrl)
           
 void testUrlRerwriteTestCase()
          An empty method so that Junit doesn't complain when running tests.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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
 

Constructor Detail

UrlRewriteTestCase

public UrlRewriteTestCase()
Method Detail

loadConf

public void loadConf(java.net.URL confFileUrl)

assertRuleMatches

public void assertRuleMatches(java.lang.String ruleName,
                              java.lang.String requestUrl)
Checks to see if the specified rule name matches the url specified.

Parameters:
ruleName - - the name of the rule
requestUrl - - the url to check

testUrlRerwriteTestCase

public void testUrlRerwriteTestCase()
An empty method so that Junit doesn't complain when running tests.