Skip to content

Commit d8dc1cc

Browse files
author
Nick
committed
Changing test method names to conform to standard
1 parent 323aed6 commit d8dc1cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core-java-modules/core-java-13/src/test/java/com/baeldung/switchExpression/SwitchExpressionsUnitTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class SwitchExpressionsUnitTest {
1414

1515
@Test
1616
@SuppressWarnings ("preview")
17-
public void switchExpression() {
17+
public void whenSwitchingOverMonthJune_thenWillReturn3() {
1818

1919
var month = JUNE;
2020

@@ -30,7 +30,7 @@ public void switchExpression() {
3030

3131
@Test
3232
@SuppressWarnings ("preview")
33-
public void switchExpressionWithYieldKeyword() {
33+
public void whenSwitchingOverMonthAugust_thenWillReturn24() {
3434
var month = AUGUST;
3535

3636
var result = switch (month) {
@@ -48,7 +48,7 @@ public void switchExpressionWithYieldKeyword() {
4848

4949
@Test
5050
@SuppressWarnings ("preview")
51-
public void switchStatementWithReturnInsideBlock() {
51+
public void whenSwitchingOverMonthJanuary_thenWillReturn3() {
5252

5353
Function<Month, Integer> func = (month) -> {
5454
switch (month) {
@@ -62,7 +62,7 @@ public void switchStatementWithReturnInsideBlock() {
6262

6363
@Test
6464
@SuppressWarnings ("preview")
65-
public void switchExpressionWithAllCasesCovered() {
65+
public void whenSwitchingOverMonthAugust_thenWillReturn2() {
6666
var month = AUGUST;
6767

6868
var result = switch (month) {

0 commit comments

Comments
 (0)