karussell / snacktory

Readability clone in Java
461 stars 159 forks source link

Build fail due to test failed #19

Closed bejean closed 12 years ago

bejean commented 12 years ago

Running de.jetwick.snacktory.ArticleTextExtractorTest 2012-09-23 08:22:25,963 [main] WARN de.jetwick.snacktory.Converter - Maxbyte of 500000 exceeded! Maybe html is now broken but try it nevertheless. Url: null 2012-09-23 08:22:26,006 [main] WARN de.jetwick.snacktory.Converter - Maxbyte of 500000 exceeded! Maybe html is now broken but try it nevertheless. Url: null Tests run: 72, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.646 sec <<< FAILURE!

Failed tests: testYomiuri(de.jetwick.snacktory.ArticleTextExtractorTest): yomiuri:????????????????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

Tests run: 95, Failures: 1, Errors: 0, Skipped: 0

The issue is line 111

    assertTrue("yomiuri:" + res.getText(), res.getText().startsWith(" 海津市海津町の国営木曽三川公園で、チューリップが見頃を迎えている。20日までは「チューリップ祭」が開かれており、大勢の人たちが多彩な色や形を鑑賞している=写真="));

The test is in success if you remove the space here >> startsWith(" 海津

karussell commented 12 years ago

Hey, I'm guessing this is caused because you are on an OS which uses a different encoding then UTF-8? Or probably you are using Eclipse? ... I fixed this via .contains("海津市海津町海津市海津町...")

bejean commented 12 years ago

I use Eclipse under Macos but with utf-8 as enccoding.

karussell commented 12 years ago

As I said I fixed the thing and it should now work for you - let me know!

But do yourself a favour and go to window -> preferences -> and search for ALL encoding settings. or just switch to a better IDE ;)

bejean commented 12 years ago

Which IDE are you suggestion ? A long time ago I used tu use IntelliJ Idea. Great IDE but not free. I see there is a open-source community version now.

karussell commented 12 years ago

If you like Eclipse then stick with it ... (or yes, use idea or netbeans)