MCPcopy Create free account
hub / github.com/cedar-policy/cedar-java / policy_effect_test_util

Function policy_effect_test_util

CedarJavaFFI/src/interface.rs:1166–1172  ·  view source on GitHub ↗
(env: &mut JNIEnv, policy: &str, expected_effect: &str)

Source from the content-addressed store, hash-verified

1164
1165 #[track_caller]
1166 fn policy_effect_test_util(env: &mut JNIEnv, policy: &str, expected_effect: &str) {
1167 let policy_string = env.new_string(policy).unwrap();
1168 let effect_result = policy_effect_jni_internal(env, policy_string).unwrap();
1169 let effect_jstr = JString::cast(env, effect_result.l().unwrap()).unwrap();
1170 let effect = String::from(env.get_string(&effect_jstr).unwrap());
1171 assert_eq!(effect, expected_effect);
1172 }
1173
1174 #[test]
1175 fn policy_effect_tests() {

Callers 1

policy_effect_testsFunction · 0.85

Calls 1

Tested by 1

policy_effect_testsFunction · 0.68