diff --git a/app-test/src/test/java/org/bspeice/minimalbible/test/format/osisparser/OsisParserTest.java b/app-test/src/test/java/org/bspeice/minimalbible/test/format/osisparser/OsisParserTest.java deleted file mode 100644 index 80d1822..0000000 --- a/app-test/src/test/java/org/bspeice/minimalbible/test/format/osisparser/OsisParserTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.bspeice.minimalbible.test.format.osisparser; - -import android.annotation.SuppressLint; - -import org.bspeice.minimalbible.service.format.osisparser.OsisParser; -import org.crosswire.jsword.book.OSISUtil; -import org.junit.Before; -import org.junit.Test; -import org.xml.sax.Attributes; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.mock; - -/** - * State machine testing, oh boy! - */ -public class OsisParserTest { - - OsisParser parser; - - @Before - public void setUp() { - parser = new OsisParser(); - } - - @SuppressLint("NewApi") - @Test - public void testDoWriteEnabledVerse() { - Attributes attributes = mock(Attributes.class); - parser.startElement("", OSISUtil.OSIS_ELEMENT_VERSE, "", attributes); - assertTrue(parser.getDoWrite().peek()); - } - - @SuppressLint("NewApi") - private void parserAssert(OsisParser parser, String element) { - Attributes attributes = mock(Attributes.class); - parser.startElement("", element, "", attributes); - assertFalse(parser.getDoWrite().isEmpty()); - parser.getDoWrite().pop(); - } - - @Test - public void testDoWriteAlwaysAdded() { - parserAssert(parser, OSISUtil.OSIS_ELEMENT_VERSE); - parserAssert(parser, ""); - parserAssert(parser, "random string"); - parserAssert(parser, OSISUtil.OSIS_ELEMENT_CELL); - } - - @SuppressLint("NewApi") - @Test - public void testEndElementPopsQueue() { - parser.getDoWrite().add(true); - parser.endElement("", "", ""); - assertTrue(parser.getDoWrite().isEmpty()); - } -} diff --git a/app/src/main/java/org/bspeice/minimalbible/activity/viewer/BibleViewerModules.java b/app/src/main/java/org/bspeice/minimalbible/activity/viewer/BibleViewerModules.java index e550051..9627a9d 100644 --- a/app/src/main/java/org/bspeice/minimalbible/activity/viewer/BibleViewerModules.java +++ b/app/src/main/java/org/bspeice/minimalbible/activity/viewer/BibleViewerModules.java @@ -78,7 +78,7 @@ public class BibleViewerModules { }) .toBlocking().first(); - prefs.defaultBookName(fallback.getName()); + prefs.defaultBookInitials(fallback.getName()); return fallback; } catch (NoSuchElementException e) { // If no books are installed, there's really nothing we can do... diff --git a/app/src/main/java/org/bspeice/minimalbible/activity/viewer/BibleViewerPreferences.java b/app/src/main/java/org/bspeice/minimalbible/activity/viewer/BibleViewerPreferences.java index ccd9680..148bfc5 100644 --- a/app/src/main/java/org/bspeice/minimalbible/activity/viewer/BibleViewerPreferences.java +++ b/app/src/main/java/org/bspeice/minimalbible/activity/viewer/BibleViewerPreferences.java @@ -15,5 +15,6 @@ public interface BibleViewerPreferences { @Default(ofInt = 14) int baseTextSize(); + void baseTextSize(int baseTextSize); }