-
-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed an issue in reporting that caused the error 'Index 1 out of bou…
…nds for length 1
- Loading branch information
Showing
2 changed files
with
48 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
serenity-model/src/test/java/net/thucydides/model/domain/TestTagTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package net.thucydides.model.domain; | ||
|
||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.Arguments; | ||
import org.junit.jupiter.params.provider.MethodSource; | ||
|
||
import java.util.stream.Stream; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
public class TestTagTest { | ||
|
||
private static Stream<Arguments> browserPlatformTags() { | ||
return Stream.of( | ||
Arguments.of("color:red", false), | ||
Arguments.of("red", false), | ||
Arguments.of("red,", false), | ||
Arguments.of("chrome", false), | ||
Arguments.of("random,windows", false), | ||
Arguments.of("chrome,random", false), | ||
Arguments.of("chrome,windows", true) | ||
); | ||
} | ||
|
||
@ParameterizedTest | ||
@MethodSource("browserPlatformTags") | ||
void testWithStringAndBoolean(String tag, boolean isABrowserPlatformTag) { | ||
assertThat(TestTag.withValue(tag).isABrowserPlatformCombination()).isEqualTo(isABrowserPlatformTag); | ||
} | ||
} |