@Test public void getUsername_returnsUsernamePassedInConstructor() { when(userService.getAccount(ProfileValues.USERNAME)).thenReturn(Calls.<Account>failure(new IOException())); createAndObserveInteractor(); assertThat(interactor.getUsername(), is(ProfileValues.USERNAME)); }
@NonNull public String getUsername() { return username; }
UserProfileInteractor implements RefreshListener { @NonNull public String getUsername() { return username; } }
UserProfileInteractor implements RefreshListener { @NonNull public String getUsername() { return username; } UserProfileInteractor(@NonNull final String username, @NonNull final UserService userService, @NonNull EventBus eventBus, @NonNull UserPrefs userPrefs); }
UserProfileInteractor implements RefreshListener { @NonNull public String getUsername() { return username; } UserProfileInteractor(@NonNull final String username, @NonNull final UserService userService, @NonNull EventBus eventBus, @NonNull UserPrefs userPrefs); @NonNull Observable<UserProfileViewModel> observeProfile(); @NonNull Observable<UserProfileImageViewModel> observeProfileImage(); @SuppressWarnings("unused") void onEventMainThread(@NonNull AccountDataLoadedEvent event); @SuppressWarnings("unused") void onEventMainThread(@NonNull ProfilePhotoUpdatedEvent event); @NonNull String getUsername(); boolean isViewingOwnProfile(); void destroy(); @Override void onRefresh(); }
UserProfileInteractor implements RefreshListener { @NonNull public String getUsername() { return username; } UserProfileInteractor(@NonNull final String username, @NonNull final UserService userService, @NonNull EventBus eventBus, @NonNull UserPrefs userPrefs); @NonNull Observable<UserProfileViewModel> observeProfile(); @NonNull Observable<UserProfileImageViewModel> observeProfileImage(); @SuppressWarnings("unused") void onEventMainThread(@NonNull AccountDataLoadedEvent event); @SuppressWarnings("unused") void onEventMainThread(@NonNull ProfilePhotoUpdatedEvent event); @NonNull String getUsername(); boolean isViewingOwnProfile(); void destroy(); @Override void onRefresh();  }