Skip to content

Commit

Permalink
Drop example to reduce verbosity and avoid language issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mpkorstanje committed May 26, 2024
1 parent 5165064 commit 1a69e08
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void should_handle_scenario_outline() {
"##teamcity[testSuiteStarted timestamp = '1970-01-01T12:00:00.000+0000' locationHint = '" + location
+ "path/test.feature:5' name = 'examples name']\n" +
"##teamcity[testSuiteStarted timestamp = '1970-01-01T12:00:00.000+0000' locationHint = '" + location
+ "path/test.feature:7' name = 'Example #1.1 - name 1']\n" +
+ "path/test.feature:7' name = '#1.1 - name 1']\n" +
"##teamcity[customProgressStatus type = 'testStarted' timestamp = '1970-01-01T12:00:00.000+0000']\n" +
"##teamcity[testStarted timestamp = '1970-01-01T12:00:00.000+0000' locationHint = '" + location
+ "path/test.feature:3' captureStandardOutput = 'true' name = 'first step']\n" +
Expand All @@ -83,10 +83,10 @@ void should_handle_scenario_outline() {
"##teamcity[testFinished timestamp = '1970-01-01T12:00:00.000+0000' duration = '0' name = 'second step']\n"
+
"##teamcity[customProgressStatus type = 'testFinished' timestamp = '1970-01-01T12:00:00.000+0000']\n" +
"##teamcity[testSuiteFinished timestamp = '1970-01-01T12:00:00.000+0000' name = 'Example #1.1 - name 1']\n"
"##teamcity[testSuiteFinished timestamp = '1970-01-01T12:00:00.000+0000' name = '#1.1 - name 1']\n"
+
"##teamcity[testSuiteStarted timestamp = '1970-01-01T12:00:00.000+0000' locationHint = '" + location
+ "path/test.feature:8' name = 'Example #1.2 - name 2']\n" +
+ "path/test.feature:8' name = '#1.2 - name 2']\n" +
"##teamcity[customProgressStatus type = 'testStarted' timestamp = '1970-01-01T12:00:00.000+0000']\n" +
"##teamcity[testStarted timestamp = '1970-01-01T12:00:00.000+0000' locationHint = '" + location
+ "path/test.feature:3' captureStandardOutput = 'true' name = 'first step']\n" +
Expand All @@ -97,7 +97,7 @@ void should_handle_scenario_outline() {
"##teamcity[testFinished timestamp = '1970-01-01T12:00:00.000+0000' duration = '0' name = 'third step']\n"
+
"##teamcity[customProgressStatus type = 'testFinished' timestamp = '1970-01-01T12:00:00.000+0000']\n" +
"##teamcity[testSuiteFinished timestamp = '1970-01-01T12:00:00.000+0000' name = 'Example #1.2 - name 2']\n"
"##teamcity[testSuiteFinished timestamp = '1970-01-01T12:00:00.000+0000' name = '#1.2 - name 2']\n"
+
"##teamcity[customProgressStatus testsCategory = '' count = '0' timestamp = '1970-01-01T12:00:00.000+0000']\n"
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public Optional<String> getName() {
.map(pickleName::equals)
.orElse(true);

StringBuilder builder = new StringBuilder("Example #" + examplesIndex + "." + rowIndex);
StringBuilder builder = new StringBuilder("#" + examplesIndex + "." + rowIndex);
if (parameterized) {
builder.append(" - ").append(pickleName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private TestDescriptor getOutline() {
@Test
void example() {
TestDescriptor example = getExample();
assertEquals("Example #1.1", example.getDisplayName());
assertEquals("#1.1", example.getDisplayName());
assertEquals(
asSet(create("FeatureTag"), create("Example1Tag"), create("ScenarioOutlineTag")),
example.getTags());
Expand All @@ -157,7 +157,7 @@ void longNames() {
JUNIT_PLATFORM_NAMING_STRATEGY_PROPERTY_NAME, "long");

TestDescriptor example = getExample();
assertEquals("A feature with scenario outlines - A scenario outline - With some text - Example #1.1",
assertEquals("A feature with scenario outlines - A scenario outline - With some text - #1.1",
example.getDisplayName());
}

Expand All @@ -178,7 +178,7 @@ void shortNamesWithExampleNumbers() {
JUNIT_PLATFORM_SHORT_NAMING_STRATEGY_EXAMPLE_NAME_PROPERTY_NAME, "number");

TestDescriptor example = getExample();
assertEquals("Example #1.1", example.getDisplayName());
assertEquals("#1.1", example.getDisplayName());
}

@Test
Expand Down

0 comments on commit 1a69e08

Please sign in to comment.