()
| 924 | |
| 925 | #[test] |
| 926 | fn instance_invocation_chain_and_to_rust() -> errors::Result<()> { |
| 927 | let jvm = create_tests_jvm()?; |
| 928 | let instance = jvm |
| 929 | .create_instance( |
| 930 | "org.astonbitecode.j4rs.tests.MyTest", |
| 931 | &[InvocationArg::try_from("string")?], |
| 932 | ) |
| 933 | ?; |
| 934 | |
| 935 | let product: isize = jvm |
| 936 | .into_chain(instance) |
| 937 | .invoke( |
| 938 | "appendToMyString", |
| 939 | &[InvocationArg::try_from("_is_appended")?], |
| 940 | ) |
| 941 | ? |
| 942 | .invoke("length", InvocationArg::empty()) |
| 943 | ? |
| 944 | .to_rust() |
| 945 | ?; |
| 946 | |
| 947 | assert!(product == 18); |
| 948 | |
| 949 | Ok(()) |
| 950 | } |
| 951 | |
| 952 | #[test] |
| 953 | fn static_invocation_chain_and_to_rust() -> errors::Result<()> { |
nothing calls this directly
no test coverage detected