From 668ee71b6c624450a86ccaaae324e1b2059130ac Mon Sep 17 00:00:00 2001 From: Art O Cathain Date: Sat, 11 Oct 2014 12:09:41 +0100 Subject: [PATCH] fix tests on JVM --- src/com/fsck/k9/mail/internet/TextBodyBuilder.java | 5 ++++- tests-on-jvm/gradlew | 0 .../src/com/fsck/k9/mail/internet/TextBodyBuilderTest.java | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 tests-on-jvm/gradlew diff --git a/src/com/fsck/k9/mail/internet/TextBodyBuilder.java b/src/com/fsck/k9/mail/internet/TextBodyBuilder.java index 9627e99e6..5f6cfd38c 100644 --- a/src/com/fsck/k9/mail/internet/TextBodyBuilder.java +++ b/src/com/fsck/k9/mail/internet/TextBodyBuilder.java @@ -204,7 +204,10 @@ public class TextBodyBuilder { return mQuotedTextHtml; } - private String textToHtmlFragment(String text) { + /** + * protected for unit-test purposes + */ + protected String textToHtmlFragment(String text) { return HtmlConverter.textToHtmlFragment(text); } diff --git a/tests-on-jvm/gradlew b/tests-on-jvm/gradlew old mode 100644 new mode 100755 diff --git a/tests-on-jvm/src/com/fsck/k9/mail/internet/TextBodyBuilderTest.java b/tests-on-jvm/src/com/fsck/k9/mail/internet/TextBodyBuilderTest.java index de7701b6a..64882691d 100644 --- a/tests-on-jvm/src/com/fsck/k9/mail/internet/TextBodyBuilderTest.java +++ b/tests-on-jvm/src/com/fsck/k9/mail/internet/TextBodyBuilderTest.java @@ -44,7 +44,7 @@ class TestingTextBodyBuilder extends TextBodyBuilder { // HtmlConverter depends on Android. // So we use dummy method for tests. @Override - public String textToHtmlFragment(String text) { + protected String textToHtmlFragment(String text) { return "" + text + ""; } }