@Test public void IsAvailable_WithValidValues_IsAvailable(){ PreferenceHelper pm = mock(PreferenceHelper.class); OpenStreetMapManager osm = new OpenStreetMapManager(pm); assertThat("Account and token indicate availability", osm.isAvailable(), is(false)); when(pm.getOSMAccessToken()).thenReturn(""); assertThat("Account and token indicate availability", osm.isAvailable(), is(false)); when(pm.getOSMAccessToken()).thenReturn("923487234"); assertThat("Account and token indicate availability", osm.isAvailable(), is(true)); }
@Override public boolean isAvailable() { return isOsmAuthorized(); }
OpenStreetMapManager extends FileSender { @Override public boolean isAvailable() { return isOsmAuthorized(); } }
OpenStreetMapManager extends FileSender { @Override public boolean isAvailable() { return isOsmAuthorized(); } OpenStreetMapManager(PreferenceHelper preferenceHelper); }
OpenStreetMapManager extends FileSender { @Override public boolean isAvailable() { return isOsmAuthorized(); } OpenStreetMapManager(PreferenceHelper preferenceHelper); static OAuthProvider getOSMAuthProvider(); boolean isOsmAuthorized(); static OAuthConsumer getOSMAuthConsumer(); @Override void uploadFile(List<File> files); @Override boolean isAvailable(); @Override boolean hasUserAllowedAutoSending(); void uploadFile(String fileName); @Override boolean accept(File dir, String name); }
OpenStreetMapManager extends FileSender { @Override public boolean isAvailable() { return isOsmAuthorized(); } OpenStreetMapManager(PreferenceHelper preferenceHelper); static OAuthProvider getOSMAuthProvider(); boolean isOsmAuthorized(); static OAuthConsumer getOSMAuthConsumer(); @Override void uploadFile(List<File> files); @Override boolean isAvailable(); @Override boolean hasUserAllowedAutoSending(); void uploadFile(String fileName); @Override boolean accept(File dir, String name);  }