diff options
| author | reger <reger18@arcor.de> | 2014-07-06 05:38:32 +0200 |
|---|---|---|
| committer | reger <reger18@arcor.de> | 2014-07-06 05:38:32 +0200 |
| commit | e94efd4d7cc97457e69e5ccb2383a03a651647ab (patch) | |
| tree | b47a2ccfb1ee0a0de0b27b6549a93dd95b29fa22 /test/net | |
| parent | 3b77e41f1aa48b166bdef27de32b740c700dd54e (diff) | |
update to JUnit 4.11
- fix build.xml -> parserTest error on Windows due to javac encoding
Diffstat (limited to 'test/net')
| -rw-r--r-- | test/net/yacy/document/ParserTest.java | 10 | ||||
| -rw-r--r-- | test/net/yacy/document/parser/htmlParserTest.java | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/test/net/yacy/document/ParserTest.java b/test/net/yacy/document/ParserTest.java index aa0dcf161..171022bc8 100644 --- a/test/net/yacy/document/ParserTest.java +++ b/test/net/yacy/document/ParserTest.java @@ -1,8 +1,5 @@ package net.yacy.document; -import static org.junit.Assert.assertThat; -import static org.junit.matchers.JUnitMatchers.containsString; - import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -16,7 +13,8 @@ import net.yacy.document.parser.docParser; import net.yacy.document.parser.odtParser; import net.yacy.document.parser.ooxmlParser; import net.yacy.document.parser.pdfParser; - +import static org.hamcrest.CoreMatchers.containsString; +import static org.junit.Assert.assertThat; import org.junit.Test; @@ -88,7 +86,7 @@ public class ParserTest { } catch (final InterruptedException ex) {} } } - + @Test public void testpdfParsers() throws FileNotFoundException, Parser.Failure, MalformedURLException, UnsupportedEncodingException, IOException { final String[][] testFiles = new String[][] { // meaning: filename in test/parsertest, mimetype, title, creator, description, @@ -110,7 +108,7 @@ public class ParserTest { int c; while( (c = content.read()) != -1 ) str.append((char)c); - + System.out.println("Parsed " + filename + ": " + str); assertThat(str.toString(), containsString("In München steht ein Hofbräuhaus, dort gibt es Bier in Maßkrügen")); assertThat(doc.dc_title(), containsString(testFile[2])); diff --git a/test/net/yacy/document/parser/htmlParserTest.java b/test/net/yacy/document/parser/htmlParserTest.java index beece1948..67c1034ba 100644 --- a/test/net/yacy/document/parser/htmlParserTest.java +++ b/test/net/yacy/document/parser/htmlParserTest.java @@ -6,8 +6,6 @@ import java.io.FileNotFoundException; import java.net.MalformedURLException; import java.nio.charset.Charset; import java.util.List; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertTrue; import junit.framework.TestCase; import net.yacy.cora.document.id.AnchorURL; import net.yacy.document.Document; |
