Skip to content

Commit

Permalink
JBEHAVE-1588 Fix flaky unit test in MetaFilterBehaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
valfirst authored Sep 7, 2023
1 parent fa486fa commit 0fe98e2
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,19 @@ void shouldParseIncludesAndExcludesUsingDefaultMetaMatcher() {
assertThat(filter.asString(), equalTo(filterAsString));
MetaMatcher metaMatcher = filter.metaMatcher();
assertThat(metaMatcher, Matchers.instanceOf(DefaultMetaMatcher.class));
DefaultMetaMatcher defaultMetaMatcher = (DefaultMetaMatcher)metaMatcher;
assertThat(defaultMetaMatcher.include().toString(), equalTo("{author=Mauro, defect-4321=, map=*API}"));
assertThat(defaultMetaMatcher.exclude().toString(), equalTo("{defect-1234=, theme=smoke testing, skip=}"));
DefaultMetaMatcher defaultMetaMatcher = (DefaultMetaMatcher) metaMatcher;

Map<String, String> expectedIncludes = new HashMap<>();
expectedIncludes.put("author", "Mauro");
expectedIncludes.put("map", "*API");
expectedIncludes.put("defect-4321", "");
assertThat(defaultMetaMatcher.include(), equalTo(expectedIncludes));

Map<String, String> expectedExcludes = new HashMap<>();
expectedExcludes.put("theme", "smoke testing");
expectedExcludes.put("skip", "");
expectedExcludes.put("defect-1234", "");
assertThat(defaultMetaMatcher.exclude(), equalTo(expectedExcludes));
}

@ParameterizedTest
Expand Down

0 comments on commit 0fe98e2

Please sign in to comment.