本文整理了Java中io.reactivex.common.Notification.equals()
方法的一些代码示例,展示了Notification.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Notification.equals()
方法的具体详情如下:
包路径:io.reactivex.common.Notification
类名称:Notification
方法名:equals
暂无
代码示例来源:origin: akarnokd/RxJava3-preview
@Test
public void testOnErrorIntegerNotificationWhenNotEqual() {
final Notification<Integer> onErrorNotification = Notification.createOnError(new Exception());
final Notification<Integer> onErrorNotification2 = Notification.createOnError(new Exception());
Assert.assertFalse(onErrorNotification.equals(onErrorNotification2));
}
}
代码示例来源:origin: akarnokd/RxJava3-preview
@Test
public void notEqualsToObject() {
Notification<Integer> n1 = Notification.createOnNext(0);
assertFalse(n1.equals(0));
Notification<Integer> n2 = Notification.createOnError(new TestException());
assertFalse(n2.equals(0));
Notification<Integer> n3 = Notification.createOnComplete();
assertFalse(n3.equals(0));
}
代码示例来源:origin: akarnokd/RxJava3-preview
@Test
public void testOnErrorIntegerNotificationsWhenEqual() {
final Exception exception = new Exception();
final Notification<Integer> onErrorNotification = Notification.createOnError(exception);
final Notification<Integer> onErrorNotification2 = Notification.createOnError(exception);
Assert.assertTrue(onErrorNotification.equals(onErrorNotification2));
}
代码示例来源:origin: akarnokd/RxJava3-preview
@Test
@Ignore("Nulls are not allowed")
public void testOnErrorNullNotificationDoesNotEqualIntegerNotification() {
final Notification<Integer> integerNotification = Notification.createOnError(new Exception());
final Notification<Integer> nullNotification = Notification.createOnError(null);
Assert.assertFalse(nullNotification.equals(integerNotification));
}
代码示例来源:origin: akarnokd/RxJava3-preview
@Test(expected = NullPointerException.class)
public void testOnNextIntegerNotificationDoesNotEqualNullNotification() {
final Notification<Integer> integerNotification = Notification.createOnNext(1);
final Notification<Integer> nullNotification = Notification.createOnNext(null);
Assert.assertFalse(integerNotification.equals(nullNotification));
}
代码示例来源:origin: akarnokd/RxJava3-preview
@Test
@Ignore("Nulls are not allowed")
public void testOnErrorIntegerNotificationDoesNotEqualNullNotification() {
final Notification<Integer> integerNotification = Notification.createOnError(new Exception());
final Notification<Integer> nullNotification = Notification.createOnError(null);
Assert.assertFalse(integerNotification.equals(nullNotification));
}
代码示例来源:origin: akarnokd/RxJava3-preview
@Test
public void testOnNextIntegerNotificationsWhenEqual() {
final Notification<Integer> integerNotification = Notification.createOnNext(1);
final Notification<Integer> integerNotification2 = Notification.createOnNext(1);
Assert.assertTrue(integerNotification.equals(integerNotification2));
}
代码示例来源:origin: akarnokd/RxJava3-preview
@Test(expected = NullPointerException.class)
public void testOnNextNullNotificationDoesNotEqualIntegerNotification() {
final Notification<Integer> integerNotification = Notification.createOnNext(1);
final Notification<Integer> nullNotification = Notification.createOnNext(null);
Assert.assertFalse(nullNotification.equals(integerNotification));
}
代码示例来源:origin: akarnokd/RxJava3-preview
@Test
public void testOnNextIntegerNotificationsWhenNotEqual() {
final Notification<Integer> integerNotification = Notification.createOnNext(1);
final Notification<Integer> integerNotification2 = Notification.createOnNext(2);
Assert.assertFalse(integerNotification.equals(integerNotification2));
}
内容来源于网络,如有侵权,请联系作者删除!