Skip to content

Commit cfd655d

Browse files
committed
use "invalid" instead of "unknown"
1 parent b502140 commit cfd655d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

exercises/concept/football-match-reports/.docs/instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ FootballMatchReports.onField(10);
2727
// => "striker"
2828
```
2929

30-
## 2. Output "unknown" if the shirt number is not part of the official list
30+
## 2. Output "invalid" if the shirt number is not part of the official list
3131

32-
Modify the `FootballMatchReports.onField()` method to return 'unknown' when a shirt number outside the range 1-11 is processed.
32+
Modify the `FootballMatchReports.onField()` method to return 'invalid' when a shirt number outside the range 1-11 is processed.
3333

3434
```java
3535
FootballMatchReports.onField(13);
36-
// => "unknown"
36+
// => "invalid"
3737
```

exercises/concept/football-match-reports/.meta/src/reference/java/FootballMatchReports.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static String onField(int shirtNum) {
3030
playerDescription = "striker";
3131
break;
3232
default:
33-
playerDescription = "unknown";
33+
playerDescription = "invalid";
3434
}
3535
return playerDescription;
3636
}

exercises/concept/football-match-reports/src/test/java/FootballMatchReportsTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ public void test_right_wing() {
6767

6868
@Test
6969
@Tag("task:2")
70-
@DisplayName("The onField method returns 'unknown' for unknown shirt number")
70+
@DisplayName("The onField method returns 'invalid' for invalid shirt number")
7171
public void test_exception() {
72-
assertThat(FootballMatchReports.onField(13)).isEqualTo("unknown");
72+
assertThat(FootballMatchReports.onField(13)).isEqualTo("invalid");
7373
}
7474

7575
@Test
7676
@Tag("task:2")
77-
@DisplayName("The onField method returns 'unknown' for negative shirt number")
77+
@DisplayName("The onField method returns 'invalid' for negative shirt number")
7878
public void test_exception_negative_number() {
79-
assertThat(FootballMatchReports.onField(-1)).isEqualTo("unknown");
79+
assertThat(FootballMatchReports.onField(-1)).isEqualTo("invalid");
8080
}
8181
}

0 commit comments

Comments
 (0)