I have the following observed
Observable<OnTextChangeEvent> subjectObservable = WidgetObservable.text(mComposeSubject);
What then does
subjectObservable.subscribe(s -> onTextChange(mComposeSubject, getString(R.string.blank_warning, mComposeSubject.getHint().toString())));
I also have the following Robolectric test
@Test
public void testOnTextChange_subjectChanged() {
EmailActivity activity = spy(getActivity());
activity.mComposeSubject.setText("test");
assertThat(activity.mSubjectSubscription).isNotNull();
verify(activity, times(1)).onTextChange(eq(activity.mComposeSubject), anyString());
}
This does not work with the Wanted error, but is not called. Does anyone have an idea of why this would be? as far as I know, this uses a simple text observer, so should it just work?
source
share