File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff 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 
3535FootballMatchReports . onField(13 );
36- //  => "unknown "
36+ //  => "invalid "
3737``` 
Original file line number Diff line number Diff 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    }
Original file line number Diff line number Diff 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}
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments