예제 #1
0
 @Test
 public void test_GetYouTubeId_ReturnsNull_WhenVideoIsNotAYouTubeVideo() {
   video = new Video("http://vimeo.com/123456789");
   assertNull(video.getYouTubeId());
 }
예제 #2
0
 @Test
 public void test_GetYouTubeId_ReturnsTheYouTubeId_WhenVideoIsAYouTubeVideo() {
   video = new Video("http://youtube.com/watch?v=DUAWAfHnx9Y");
   assertEquals("DUAWAfHnx9Y", video.getYouTubeId());
 }