diff --git a/src/getUrlResultsTest.java b/src/getUrlResultsTest.java index 7a79a38..a210d1d 100644 --- a/src/getUrlResultsTest.java +++ b/src/getUrlResultsTest.java @@ -11,24 +11,24 @@ } public static boolean runOnlineTest() { - String correct = "EXEMPELSEXEMPLAR"; - String answer = ""; + String correct = "EXEMPELSEXEMPLAREXEMPLENEXEMPLET"; + String result = ""; for (String line : getUrlResults.getSearchResults("EXEMP???")) { - answer += line; + result += line; } - return (correct.equals(answer)); + return (correct.equals(result)); } public static boolean runOfflineTest() { - String correct = "EXEMPELSEXEMPLAR"; - String answer = ""; + String correct = "EXEMPELSEXEMPLAREXEMPLENEXEMPLET"; + String result = ""; for (String line : getUrlResults.getWordsList(getUrlListFromFile(), "EXEMP???")) { - answer += line; + result += line; } - return (correct.equals(answer)); + return (correct.equals(result)); } private static List getUrlListFromFile() { @@ -41,6 +41,7 @@ linesList.add(line); line = br.readLine(); } + } catch (IOException ioe) {} return linesList;