예제 #1
0
 @Test
 public void play() {
   player.play();
   /*
    * Here it¡¯s asserting that the message from the SgtPeppers.play() method
    * was sent to the console.
    */
   assertEquals(
       "Playing Sgt. Pepper's Lonely Hearts Club Band by The Beatles\r\n", // StandardOutputStreamLog window \r\n  //linux \n
       log.getLog());
   /*
    * If you verify logs that contain line separators than the separators
    * are different (e.g. Linux: \n , Windows: \r\n ).
    */
 }
예제 #2
0
 @Test
 public void play() {
   player.play();
   assertEquals("Playing Sgt. Pepper's Lonely Hearts Club Band by The Beatles\n", log.getLog());
 }