@Test public void testGetBibleVersions() { final ClientSession clientSessionMock = mock(ClientSession.class); when(clientSessionMock.getLocale()).thenReturn(Locale.getDefault()); when(this.clientSessionProvider.get()).thenReturn(clientSessionMock); this.testController.getModules("true"); verify(this.bibleInformation).getAvailableModules(true, null, Locale.getDefault()); }
public ModulesForLanguageUser getModules(final String allVersions) { final String language = this.clientSession.get().getLanguage(); final Locale userLocale = this.clientSession.get().getLocale(); final ModulesForLanguageUser versions = new ModulesForLanguageUser(); versions.setLanguageCode(userLocale.getLanguage()); versions.setLanguageName(ContemporaryLanguageUtils.capitaliseFirstLetter(userLocale .getDisplayLanguage(userLocale))); versions.setVersions(this.bibleInformation.getAvailableModules(Boolean.valueOf(allVersions), language, userLocale)); final Iterator<BibleVersion> iterator = versions.getVersions().iterator(); while(iterator.hasNext()) { if(!iterator.next().getInitials().startsWith("Chi")) { iterator.remove(); } } return versions; }
BibleController { public ModulesForLanguageUser getModules(final String allVersions) { final String language = this.clientSession.get().getLanguage(); final Locale userLocale = this.clientSession.get().getLocale(); final ModulesForLanguageUser versions = new ModulesForLanguageUser(); versions.setLanguageCode(userLocale.getLanguage()); versions.setLanguageName(ContemporaryLanguageUtils.capitaliseFirstLetter(userLocale .getDisplayLanguage(userLocale))); versions.setVersions(this.bibleInformation.getAvailableModules(Boolean.valueOf(allVersions), language, userLocale)); final Iterator<BibleVersion> iterator = versions.getVersions().iterator(); while(iterator.hasNext()) { if(!iterator.next().getInitials().startsWith("Chi")) { iterator.remove(); } } return versions; } }
BibleController { public ModulesForLanguageUser getModules(final String allVersions) { final String language = this.clientSession.get().getLanguage(); final Locale userLocale = this.clientSession.get().getLocale(); final ModulesForLanguageUser versions = new ModulesForLanguageUser(); versions.setLanguageCode(userLocale.getLanguage()); versions.setLanguageName(ContemporaryLanguageUtils.capitaliseFirstLetter(userLocale .getDisplayLanguage(userLocale))); versions.setVersions(this.bibleInformation.getAvailableModules(Boolean.valueOf(allVersions), language, userLocale)); final Iterator<BibleVersion> iterator = versions.getVersions().iterator(); while(iterator.hasNext()) { if(!iterator.next().getInitials().startsWith("Chi")) { iterator.remove(); } } return versions; } @Inject  BibleController(final BibleInformationService bibleInformation,
                           final Provider<ClientSession> clientSession,
                           PassageOptionsValidationService optionsValidationService); }
BibleController { public ModulesForLanguageUser getModules(final String allVersions) { final String language = this.clientSession.get().getLanguage(); final Locale userLocale = this.clientSession.get().getLocale(); final ModulesForLanguageUser versions = new ModulesForLanguageUser(); versions.setLanguageCode(userLocale.getLanguage()); versions.setLanguageName(ContemporaryLanguageUtils.capitaliseFirstLetter(userLocale .getDisplayLanguage(userLocale))); versions.setVersions(this.bibleInformation.getAvailableModules(Boolean.valueOf(allVersions), language, userLocale)); final Iterator<BibleVersion> iterator = versions.getVersions().iterator(); while(iterator.hasNext()) { if(!iterator.next().getInitials().startsWith("Chi")) { iterator.remove(); } } return versions; } @Inject  BibleController(final BibleInformationService bibleInformation,
                           final Provider<ClientSession> clientSession,
                           PassageOptionsValidationService optionsValidationService); ModulesForLanguageUser getModules(final String allVersions); OsisWrapper getBibleText(final String version, final String reference); String getPlainTextPreview(final String version, final String reference); OsisWrapper getBibleText(final String version, final String reference, final String options); OsisWrapper getBibleText(final String version, final String reference, final String options,
                                    final String interlinearVersion); @Timed(name = "getText", rateUnit = TimeUnit.SECONDS, durationUnit = TimeUnit.MILLISECONDS) OsisWrapper getBibleText(final String version, final String reference, final String options,
                                    final String interlinearVersion, final String interlinearMode); OsisWrapper getBibleByVerseNumber(final String version, final String startVerseId,
                                             final String endVerseId, final String roundUp, final String options); OsisWrapper getBibleByVerseNumber(final String version, final String startVerseId,
                                             final String endVerseId, final String roundUp, final String options,
                                             final String interlinearVersion); StrongCountsAndSubjects getStrongNumbersAndSubjects(final String version, final String reference); @Timed(name = "vocab-popup", group = "analysis", rateUnit = TimeUnit.SECONDS, durationUnit = TimeUnit.MILLISECONDS) StrongCountsAndSubjects getStrongNumbersAndSubjects(final String version, final String reference, final String userLanguage); AvailableFeatures getFeatures(final String version, final String extraVersions, final String displayMode); List<EnrichedLookupOption> getAllFeatures(); List<BookName> getBibleBookNames(final String bookStart, final String version); KeyWrapper getNextChapter(final String reference, final String version); KeyWrapper convertReferenceForBook(final String reference, final String sourceVersion, final String targetVersion); KeyWrapper getPreviousChapter(final String reference, final String version); KeyWrapper expandKeyToChapter(final String sourceVersion, final String version, final String reference); KeyWrapper getKeyInfo(final String reference, final String sourceVersion, final String version); }
BibleController { public ModulesForLanguageUser getModules(final String allVersions) { final String language = this.clientSession.get().getLanguage(); final Locale userLocale = this.clientSession.get().getLocale(); final ModulesForLanguageUser versions = new ModulesForLanguageUser(); versions.setLanguageCode(userLocale.getLanguage()); versions.setLanguageName(ContemporaryLanguageUtils.capitaliseFirstLetter(userLocale .getDisplayLanguage(userLocale))); versions.setVersions(this.bibleInformation.getAvailableModules(Boolean.valueOf(allVersions), language, userLocale)); final Iterator<BibleVersion> iterator = versions.getVersions().iterator(); while(iterator.hasNext()) { if(!iterator.next().getInitials().startsWith("Chi")) { iterator.remove(); } } return versions; } @Inject  BibleController(final BibleInformationService bibleInformation,
                           final Provider<ClientSession> clientSession,
                           PassageOptionsValidationService optionsValidationService); ModulesForLanguageUser getModules(final String allVersions); OsisWrapper getBibleText(final String version, final String reference); String getPlainTextPreview(final String version, final String reference); OsisWrapper getBibleText(final String version, final String reference, final String options); OsisWrapper getBibleText(final String version, final String reference, final String options,
                                    final String interlinearVersion); @Timed(name = "getText", rateUnit = TimeUnit.SECONDS, durationUnit = TimeUnit.MILLISECONDS) OsisWrapper getBibleText(final String version, final String reference, final String options,
                                    final String interlinearVersion, final String interlinearMode); OsisWrapper getBibleByVerseNumber(final String version, final String startVerseId,
                                             final String endVerseId, final String roundUp, final String options); OsisWrapper getBibleByVerseNumber(final String version, final String startVerseId,
                                             final String endVerseId, final String roundUp, final String options,
                                             final String interlinearVersion); StrongCountsAndSubjects getStrongNumbersAndSubjects(final String version, final String reference); @Timed(name = "vocab-popup", group = "analysis", rateUnit = TimeUnit.SECONDS, durationUnit = TimeUnit.MILLISECONDS) StrongCountsAndSubjects getStrongNumbersAndSubjects(final String version, final String reference, final String userLanguage); AvailableFeatures getFeatures(final String version, final String extraVersions, final String displayMode); List<EnrichedLookupOption> getAllFeatures(); List<BookName> getBibleBookNames(final String bookStart, final String version); KeyWrapper getNextChapter(final String reference, final String version); KeyWrapper convertReferenceForBook(final String reference, final String sourceVersion, final String targetVersion); KeyWrapper getPreviousChapter(final String reference, final String version); KeyWrapper expandKeyToChapter(final String sourceVersion, final String version, final String reference); KeyWrapper getKeyInfo(final String reference, final String sourceVersion, final String version);  }