01: package com.canoo.webtest.plugins.emailtest;
02:
03: import junit.framework.TestCase;
04:
05: /**
06: * Unit tests for {@link AbstractSelectStep}.
07: * @author Marc Guillemot
08: */
09: public class AbstractSelectStepTest extends TestCase {
10:
11: public void testDoMatch() {
12: assertTrue(AbstractSelectStep.doMatch("bla", "bla"));
13: assertTrue(AbstractSelectStep.doMatch("", "bla"));
14: assertTrue(AbstractSelectStep.doMatch(null, "bla"));
15: assertTrue(AbstractSelectStep.doMatch("", null));
16: assertTrue(AbstractSelectStep.doMatch(null, null));
17: assertFalse(AbstractSelectStep.doMatch("bla", null));
18: assertFalse(AbstractSelectStep.doMatch("/bla/", null));
19: assertFalse(AbstractSelectStep.doMatch("/bla/", "bli"));
20: assertTrue(AbstractSelectStep.doMatch("/bla/", "bla"));
21: assertTrue(AbstractSelectStep.doMatch("/.*/", "bla"));
22: assertTrue(AbstractSelectStep.doMatch("/.*/", ""));
23: assertTrue(AbstractSelectStep.doMatch("/.*/", null));
24: }
25: }
|