File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
core-java-modules/core-java-13/src/test/java/com/baeldung/switchExpression Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments