下面列出了java.util.OptionalLong#orElseThrow ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Test(expectedExceptions=ObscureException.class)
public void testEmptyOrElseThrow() throws Exception {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(ObscureException::new);
}
@Test(expectedExceptions=ObscureException.class)
public void testEmptyOrElseThrow() throws Exception {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(ObscureException::new);
}
@Test(expectedExceptions=NullPointerException.class)
public void testEmptyOrElseThrowNull() throws Throwable {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(null);
}
@Test(expectedExceptions=ObscureException.class)
public void testEmptyOrElseThrow() throws Exception {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(ObscureException::new);
}
@Test(expectedExceptions=NullPointerException.class)
public void testEmptyOrElseThrowNull() throws Throwable {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(null);
}
@Test(expectedExceptions=ObscureException.class)
public void testEmptyOrElseThrow() throws Exception {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(ObscureException::new);
}
@Test(expectedExceptions=NullPointerException.class)
public void testEmptyOrElseThrowNull() throws Throwable {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(null);
}
@Test(expectedExceptions=ObscureException.class)
public void testEmptyOrElseThrow() throws Exception {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(ObscureException::new);
}
@Override
public long echoOptionalLong(OptionalLong value)
throws EmptyOptionalException
{
return value.orElseThrow(EmptyOptionalException::new);
}
@Test(expectedExceptions=NullPointerException.class)
public void testEmptyOrElseThrowNull() throws Throwable {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(null);
}
@Test(expectedExceptions=NullPointerException.class)
public void testEmptyOrElseThrowNull() throws Throwable {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(null);
}
@Test(expectedExceptions=NullPointerException.class)
public void testEmptyOrElseThrowNull() throws Throwable {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(null);
}
@Test(expectedExceptions=ObscureException.class)
public void testEmptyOrElseThrow() throws Exception {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(ObscureException::new);
}
@Test(expectedExceptions=NullPointerException.class)
public void testEmptyOrElseThrowNull() throws Throwable {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(null);
}
@Test(expectedExceptions=ObscureException.class)
public void testEmptyOrElseThrow() throws Exception {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(ObscureException::new);
}
@Test(expectedExceptions=NullPointerException.class)
public void testEmptyOrElseThrowNull() throws Throwable {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(null);
}
@Test(expectedExceptions=ObscureException.class)
public void testEmptyOrElseThrow() throws Exception {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(ObscureException::new);
}
@Test(expectedExceptions=NullPointerException.class)
public void testEmptyOrElseThrowNull() throws Throwable {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(null);
}
@Test(expectedExceptions=ObscureException.class)
public void testEmptyOrElseThrow() throws Exception {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(ObscureException::new);
}
@Test(expectedExceptions=NullPointerException.class)
public void testEmptyOrElseThrowNull() throws Throwable {
OptionalLong empty = OptionalLong.empty();
long got = empty.orElseThrow(null);
}