예제 #1
0
 @Test
 public void testDelegate3() {
   TestSubscriber<Integer> ts1 = TestSubscriber.create();
   TestSubscriber<Integer> ts2 = TestSubscriber.create(ts1, 0);
   ts2.onCompleted();
   ts1.assertCompleted();
 }
예제 #2
0
 @Test
 public void testNotCompleted() {
   TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
   try {
     ts.assertCompleted();
   } catch (AssertionError ex) {
     // expected
     return;
   }
   fail("Not completed and no assertion error!");
 }
예제 #3
0
 @Test
 public void testMultipleCompletions() {
   TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
   ts.onCompleted();
   ts.onCompleted();
   try {
     ts.assertCompleted();
   } catch (AssertionError ex) {
     // expected
     return;
   }
   fail("Multiple completions and no assertion error!");
 }