@Test
public void testSimpleRegexMatch()
{
SimpleRegexMatcher matcher = new SimpleRegexMatcher();
// SimpleLog log = new SimpleLog("{testSimpleRegexMatch:SimpleRegexMatcher]");
// log.setLevel(SimpleLog.LOG_LEVEL_TRACE);
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '/alpha/beta/gamma' ", true,
matcher.match( "/alpha/beta/gamma", "/alpha/beta/gamma" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '/alpha/beta/gamma/epsilon' ", false,
matcher.match( "/alpha/beta/gamma", "/alpha/beta/gamma/epsilon" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '/alpha/*' ", true,
matcher.match( "/alpha/beta/gamma", "/alpha/*" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '/alpha/*/gamma' ", true,
matcher.match( "/alpha/beta/gamma", "/alpha/*/gamma" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '/alpha/*me' ", false,
matcher.match( "/alpha/beta/gamma", "/alpha/*me" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '*/beta/gamma' ", true,
matcher.match( "/alpha/beta/gamma", "*/beta/gamma" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '*/alpha/beta/gamma' ", true,
matcher.match( "/alpha/beta/gamma", "*/alpha/beta/gamma" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '*/bet/gamma' ", false,
matcher.match( "/alpha/beta/gamma", "*/bet/gamma" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to 'alph?/beta/gamma' ", true,
matcher.match( "/alpha/beta/gamma", "/alph?/beta/gamma" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '/?lpha/beta/gamma' ", true,
matcher.match( "/alpha/beta/gamma", "/?lpha/beta/gamma" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '/alpha/?beta/gamma' ", false,
matcher.match( "/alpha/beta/gamma", "/alpha/?beta/gamma" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '/alpha/?eta/*' ", true,
matcher.match( "/alpha/beta/gamma", "/alpha/?eta/*" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '/alpha/?eta/*e' ", false,
matcher.match( "/alpha/beta/gamma", "/alpha/?eta/*e" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma' to '*/?et?/?amma' ", true,
matcher.match( "/alpha/beta/gamma", "*/?et?/?amma" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma/beta/epsilon/beta/gamma/epsilon' to "
+ " '*/beta/gamma/?p*n' ", true,
matcher.match( "/alpha/beta/gamma/beta/epsilon/beta/gamma/epsilon", "*/beta/gamma/?p*n" ) );
assertEquals( "Simple Regex Match '/alpha/beta/gamma/beta/epsilon/beta/gamma/epsilon' to "
+ " '*/beta/gamma/?p*no' ", false, matcher.match( "/alpha/beta/gamma", "*/beta/gamma/?p*no" ) );
}