Skip to content

Commit

Permalink
Minor GeneratorPatternValidTest improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodforGod committed Aug 7, 2020
1 parent 26b3f9c commit b18fa1a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public GeneratorPatternValidTest(IGenerator generator, Class genClass, Pattern p
this.pattern = pattern;
}

@Parameters(name = "{index}: Generator ({0}), Regex {2}")
@Parameters(name = "{index}: Data Type ({1}), Regex {2}")
public static Collection<Object[]> data() {
final String uuidPattern = "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}";

Expand Down Expand Up @@ -116,7 +116,8 @@ public void valueRegexMatching() {
assertEquals(generated.getClass(), genClass);

final String v = String.valueOf(generated);
final String msg = generator.getClass().getSimpleName() + " : Pattern -" + pattern.pattern() + " : Value - " + v;
final String msg = generator.getClass().getSimpleName() + " : Pattern - '" + pattern.pattern() + "' : Value - '" + v
+ "'";
assertTrue(msg, pattern.matcher(v).matches());
}
}
Expand Down

0 comments on commit b18fa1a

Please sign in to comment.