@@ -0,0 +1,1741 @@
+package at.fhj.itm.pswe.test;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.FileReader;%0Aimport java.io.IOException;%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Date;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport at.fhj.itm.pswe.pagecrawler.MainCrawler;%0A%0Apublic class CrawlerTest %7B%0A%09private MainCrawler mc;%0A%09@Before%0A%09public void setup()%0A%09%7B%0A%09%09mc=new MainCrawler();%0A%09%09mc.setDepth(1);%0A%09%09mc.setUrl(%22http://pfiff.me/pswengi/%22);%0A%09%09mc.crawl();%0A%09   %0A%09%7D%0A%09%0A%09@Test%0A%09public void testCrawler()%0A%09%7B%0A%09%09 FileReader fr;%0A%09%09%09try %7B%0A%09%09%09%09//anpassen%0A%09%09%09%09fr = new FileReader(%22C:/Users/Viktoria/Documents/GitHub/result/crawl/pfiff_me_pswengi__12_29_2015-7_51.txt%22);%0A%09%09%09%09 BufferedReader br = new BufferedReader(fr);%0A%0A%09%09%09%09    String url = br.readLine();%0A%09%09%09%09    Assert.assertEquals(mc.getUrl(), url);%0A%09%09%09%09    %0A%09%09%09%09    String dateString=br.readLine();%0A%09%09%09%09    SimpleDateFormat sdf = new SimpleDateFormat(%22dd:MM:yyyy%22);%0A%09%09%09%09    System.out.println(sdf.format(new Date()));%0A%09%09%09%09    Assert.assertEquals(sdf.format(new Date()), dateString);%0A%09%09%09%09    %0A%09%09%09%09    String urlStartpage=br.readLine();%0A%09%09%09%09    Assert.assertEquals(mc.getUrl(), urlStartpage);%0A%09%09%09%09    %0A%09%09%09%09    String textfirstPage=br.readLine();%0A%09%09%09%09    Assert.assertEquals(%22Das ist eine Testseite Seite 2%22, textfirstPage);%0A%09%09%09%09    %0A%09%09%09%09    String nextURL=br.readLine();%0A%09%09%09%09    Assert.assertEquals(%22http://pfiff.me/pswengi/Seite2.html%22,nextURL);%0A%09%09%09%09    %0A%09%09%09%09    String textsecondPage=br.readLine();%0A%09%09%09%09    Assert.assertEquals(%22Dies ist eine andere Testseite%22, textsecondPage);%0A%0A%09%09%09%09    br.close();%0A%09%09%09%7D catch (FileNotFoundException ef) %7B%0A%09%09%09%09ef.printStackTrace();%0A%09%09%09%7D catch (IOException ei) %7B%0A%09%09%09%09ei.printStackTrace();%0A%09%09%09%7D%0A%09%09%0A%09%7D%0A%0A%7D%0A

Test Crawler