@Test public void version_whenDirtyBetaRelease_returnsSemanticVersionWithPrefix_andBetaVersion() { MainMenuViewModel viewModel = createViewModelWithVersion("v1.23.0-beta.1-dirty"); assertThat(viewModel.getVersion(), equalTo("v1.23.0 Beta 1")); }
public String getVersion() { if (version.getBetaNumber() != null) { return version.getSemanticVersion() + " Beta " + version.getBetaNumber(); } else { return version.getSemanticVersion(); } }
MainMenuViewModel extends ViewModel { public String getVersion() { if (version.getBetaNumber() != null) { return version.getSemanticVersion() + " Beta " + version.getBetaNumber(); } else { return version.getSemanticVersion(); } } }
MainMenuViewModel extends ViewModel { public String getVersion() { if (version.getBetaNumber() != null) { return version.getSemanticVersion() + " Beta " + version.getBetaNumber(); } else { return version.getSemanticVersion(); } } MainMenuViewModel(Application application, VersionInformation versionInformation, PreferencesProvider preferencesProvider); }
MainMenuViewModel extends ViewModel { public String getVersion() { if (version.getBetaNumber() != null) { return version.getSemanticVersion() + " Beta " + version.getBetaNumber(); } else { return version.getSemanticVersion(); } } MainMenuViewModel(Application application, VersionInformation versionInformation, PreferencesProvider preferencesProvider); String getVersion(); @Nullable String getVersionCommitDescription(); boolean shouldEditSavedFormButtonBeVisible(); boolean shouldSendFinalizedFormButtonBeVisible(); boolean shouldViewSentFormButtonBeVisible(); boolean shouldGetBlankFormButtonBeVisible(); boolean shouldDeleteSavedFormButtonBeVisible(); }
MainMenuViewModel extends ViewModel { public String getVersion() { if (version.getBetaNumber() != null) { return version.getSemanticVersion() + " Beta " + version.getBetaNumber(); } else { return version.getSemanticVersion(); } } MainMenuViewModel(Application application, VersionInformation versionInformation, PreferencesProvider preferencesProvider); String getVersion(); @Nullable String getVersionCommitDescription(); boolean shouldEditSavedFormButtonBeVisible(); boolean shouldSendFinalizedFormButtonBeVisible(); boolean shouldViewSentFormButtonBeVisible(); boolean shouldGetBlankFormButtonBeVisible(); boolean shouldDeleteSavedFormButtonBeVisible();  }