AbstractSelectStepTest.java :  » Testing » webtest » com » canoo » webtest » plugins » emailtest » Java Open Source

Java Open Source » Testing » webtest 
webtest » com » canoo » webtest » plugins » emailtest » AbstractSelectStepTest.java
package com.canoo.webtest.plugins.emailtest;

import junit.framework.TestCase;

/**
 * Unit tests for {@link AbstractSelectStep}.
 * @author Marc Guillemot
 */
public class AbstractSelectStepTest extends TestCase {

    public void testDoMatch() {
      assertTrue(AbstractSelectStep.doMatch("bla", "bla"));
      assertTrue(AbstractSelectStep.doMatch("", "bla"));
      assertTrue(AbstractSelectStep.doMatch(null, "bla"));
      assertTrue(AbstractSelectStep.doMatch("", null));
      assertTrue(AbstractSelectStep.doMatch(null, null));
      assertFalse(AbstractSelectStep.doMatch("bla", null));
      assertFalse(AbstractSelectStep.doMatch("/bla/", null));
      assertFalse(AbstractSelectStep.doMatch("/bla/", "bli"));
      assertTrue(AbstractSelectStep.doMatch("/bla/", "bla"));
      assertTrue(AbstractSelectStep.doMatch("/.*/", "bla"));
      assertTrue(AbstractSelectStep.doMatch("/.*/", ""));
      assertTrue(AbstractSelectStep.doMatch("/.*/", null));
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.