()
| 238 | |
| 239 | #[test] |
| 240 | fn is_null() -> errors::Result<()> { |
| 241 | let jvm = create_tests_jvm()?; |
| 242 | let test_instance = jvm |
| 243 | .create_instance("org.astonbitecode.j4rs.tests.MyTest", InvocationArg::empty()) |
| 244 | ?; |
| 245 | let maybe_null = jvm.invoke(&test_instance, "getNullInteger", InvocationArg::empty())?; |
| 246 | let is_null = |
| 247 | jvm.invoke_static( |
| 248 | "java.util.Objects", |
| 249 | "isNull", |
| 250 | &[InvocationArg::try_from(maybe_null)?])?; |
| 251 | let is_null: bool = jvm.to_rust(is_null)?; |
| 252 | assert!(is_null); |
| 253 | Ok(()) |
| 254 | } |
| 255 | |
| 256 | #[test] |
| 257 | fn try_from_jobject() -> errors::Result<()> { |
nothing calls this directly
no test coverage detected