Package org.marketcetera.util.test
Class RegExAssert
- java.lang.Object
-
- org.marketcetera.util.test.RegExAssert
-
public final class RegExAssert extends Object
Assertions based on regular expression matching.- Since:
- 0.5.0
- Version:
- $Id$
- Author:
- tlerios@marketcetera.com
-
-
Constructor Summary
Constructors Modifier Constructor Description privateRegExAssert()Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidassertMatches(String pattern, String string)Asserts that the given string matches the given pattern.static voidassertMatches(String message, String pattern, String string)Asserts that the given string matches the given pattern.
-
-
-
Method Detail
-
assertMatches
public static void assertMatches(String message, String pattern, String string)
Asserts that the given string matches the given pattern. This assertion holds if both pattern and string are null. If the assertion does not hold, theAssertionErrorthrown starts with the given message, which may be null if no such custom message prefix is desired.- Parameters:
message- The message.pattern- The pattern.string- The string.
-
-