()
| 584 | |
| 585 | #[test] |
| 586 | fn invoke_map() -> errors::Result<()> { |
| 587 | let jvm = create_tests_jvm()?; |
| 588 | |
| 589 | match jvm.create_instance("org.astonbitecode.j4rs.tests.MyTest", InvocationArg::empty()) { |
| 590 | Ok(i) => { |
| 591 | let map = HashMap::from([("Potatoes", 3), ("Tomatoes", 33), ("Carrotoes", 333)]); |
| 592 | let map_instance = jvm |
| 593 | .java_map(JavaClass::String, JavaClass::Integer, map)?; |
| 594 | let res = jvm.invoke(&i, "map", &[InvocationArg::from(map_instance)]); |
| 595 | assert!(res.is_ok()); |
| 596 | } |
| 597 | Err(error) => { |
| 598 | panic!("ERROR when creating Instance: {:?}", error); |
| 599 | } |
| 600 | } |
| 601 | |
| 602 | Ok(()) |
| 603 | } |
| 604 | |
| 605 | #[test] |
| 606 | fn multithread() -> errors::Result<()> { |
nothing calls this directly
no test coverage detected