예제 #1
0
 public void IsPictureLink()
 {
     Assert.IsTrue(FunnyService.isPictureLink("http://kfodksf/something.jpg"));
     Assert.IsTrue(FunnyService.isPictureLink("http://www.plaa.com/something.jpeg"));
     Assert.IsTrue(FunnyService.isPictureLink("http://db.some.fi/plaa/something.png"));
     Assert.IsTrue(FunnyService.isPictureLink("http://something.gif"));
     Assert.IsFalse(FunnyService.isPictureLink("https://www.something.com/4543453"));
     Assert.IsFalse(FunnyService.isPictureLink("http://wwww.reddit/r/doesnotexist/dfasff324324234fasdf"));
     Assert.IsFalse(FunnyService.isPictureLink("http://imgur.com/gallery/2GfQtZ0"));
     Assert.IsFalse(FunnyService.isPictureLink("https://www.google.com/maps/@38.921194,-77.041887,3a,75y,82.02h,79.5t/data=!3m5!1e1!3m3!1sIdCmgjET_rtLHHlpFFFryw!2e0!3e2"));
 }
예제 #2
0
 public void IsPictureLinkNull()
 {
     Assert.IsFalse(FunnyService.isPictureLink(null));
 }