@@ -69,29 +69,29 @@ public void setup() {
69
69
70
70
@ Test
71
71
public void itSupportsFragmentsFromTheSupportV4Library () {
72
- AndroidObservable .fromFragment (supportFragment , Observable .just ("success" )).subscribe (new TestObserver <String >(observer ));
72
+ AndroidObservable .bindFragment (supportFragment , Observable .just ("success" )).subscribe (new TestObserver <String >(observer ));
73
73
verify (observer ).onNext ("success" );
74
74
verify (observer ).onCompleted ();
75
75
}
76
76
77
77
@ Test
78
78
public void itSupportsNativeFragments () {
79
- AndroidObservable .fromFragment (fragment , Observable .just ("success" )).subscribe (new TestObserver <String >(observer ));
79
+ AndroidObservable .bindFragment (fragment , Observable .just ("success" )).subscribe (new TestObserver <String >(observer ));
80
80
verify (observer ).onNext ("success" );
81
81
verify (observer ).onCompleted ();
82
82
}
83
83
84
84
@ Test (expected = IllegalArgumentException .class )
85
85
public void itThrowsIfObjectPassedIsNotAFragment () {
86
- AndroidObservable .fromFragment ("not a fragment" , Observable .never ());
86
+ AndroidObservable .bindFragment ("not a fragment" , Observable .never ());
87
87
}
88
88
89
89
@ Test (expected = IllegalStateException .class )
90
90
public void itThrowsIfObserverCallsFromFragmentFromBackgroundThread () throws Throwable {
91
91
final Future <Object > future = Executors .newSingleThreadExecutor ().submit (new Callable <Object >() {
92
92
@ Override
93
93
public Object call () throws Exception {
94
- AndroidObservable .fromFragment (fragment , Observable .empty ());
94
+ AndroidObservable .bindFragment (fragment , Observable .empty ());
95
95
return null ;
96
96
}
97
97
});
@@ -107,7 +107,7 @@ public void itThrowsIfObserverCallsFromActivityFromBackgroundThread() throws Thr
107
107
final Future <Object > future = Executors .newSingleThreadExecutor ().submit (new Callable <Object >() {
108
108
@ Override
109
109
public Object call () throws Exception {
110
- AndroidObservable .fromActivity (activity , Observable .empty ());
110
+ AndroidObservable .bindActivity (activity , Observable .empty ());
111
111
return null ;
112
112
}
113
113
});
0 commit comments