本文整理匯總了Java中io.reactivex.observers.TestObserver.assertNotTerminated方法的典型用法代碼示例。如果您正苦於以下問題:Java TestObserver.assertNotTerminated方法的具體用法?Java TestObserver.assertNotTerminated怎麽用?Java TestObserver.assertNotTerminated使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類io.reactivex.observers.TestObserver
的用法示例。
在下文中一共展示了TestObserver.assertNotTerminated方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: noEvents
import io.reactivex.observers.TestObserver; //導入方法依賴的package包/類
@Test
public void noEvents() {
TestObserver<String> testObserver = stream
.compose(RxLifecycle.<String, String>bindUntilEvent(lifecycle, "stop"))
.test();
stream.onNext("1");
stream.onNext("2");
testObserver.assertValues("1", "2");
testObserver.assertNotTerminated();
}
示例2: oneWrongEvent
import io.reactivex.observers.TestObserver; //導入方法依賴的package包/類
@Test
public void oneWrongEvent() {
TestObserver<String> testObserver = stream
.compose(RxLifecycle.<String, String>bindUntilEvent(lifecycle, "stop"))
.test();
stream.onNext("1");
lifecycle.onNext("keep going");
stream.onNext("2");
testObserver.assertValues("1", "2");
testObserver.assertNotTerminated();
}
示例3: noEvent
import io.reactivex.observers.TestObserver; //導入方法依賴的package包/類
@Test
public void noEvent() {
TestObserver<String> testObserver = stream
.compose(RxLifecycle.<String, String>bind(lifecycle))
.test();
stream.onNext("1");
stream.onNext("2");
testObserver.assertValues("1", "2");
testObserver.assertNotTerminated();
}
示例4: noEvents
import io.reactivex.observers.TestObserver; //導入方法依賴的package包/類
@Test
public void noEvents() {
TestObserver<String> testObserver = stream
.compose(RxLifecycle.<String, String>bind(lifecycle, CORRESPONDING_EVENTS))
.test();
stream.onNext("1");
stream.onNext("2");
testObserver.assertValues("1", "2");
testObserver.assertNotTerminated();
}
開發者ID:xufreshman,項目名稱:RxLifeCycle,代碼行數:12,代碼來源:UntilCorrespondingEventTransformerObservableTest.java
示例5: oneStartEvent
import io.reactivex.observers.TestObserver; //導入方法依賴的package包/類
@Test
public void oneStartEvent() {
TestObserver<String> testObserver = stream
.compose(RxLifecycle.<String, String>bind(lifecycle, CORRESPONDING_EVENTS))
.test();
lifecycle.onNext("create");
stream.onNext("1");
stream.onNext("2");
testObserver.assertValues("1", "2");
testObserver.assertNotTerminated();
}
開發者ID:xufreshman,項目名稱:RxLifeCycle,代碼行數:14,代碼來源:UntilCorrespondingEventTransformerObservableTest.java
示例6: twoOpenEvents
import io.reactivex.observers.TestObserver; //導入方法依賴的package包/類
@Test
public void twoOpenEvents() {
TestObserver<String> testObserver = stream
.compose(RxLifecycle.<String, String>bind(lifecycle, CORRESPONDING_EVENTS))
.test();
lifecycle.onNext("create");
stream.onNext("1");
lifecycle.onNext("start");
stream.onNext("2");
testObserver.assertValues("1", "2");
testObserver.assertNotTerminated();
}
開發者ID:xufreshman,項目名稱:RxLifeCycle,代碼行數:15,代碼來源:UntilCorrespondingEventTransformerObservableTest.java