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

Function get_cedar_schema_internal_invalid

CedarJavaFFI/src/interface.rs:1849–1872  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1847
1848 #[test]
1849 fn get_cedar_schema_internal_invalid() {
1850 let mut env = JVM.attach_current_thread().unwrap();
1851 let json_input = r#"
1852
1853 entity User = {
1854 name: String,
1855 age?: Long,
1856 };
1857 entity Photo in Album;
1858 entity Album;
1859 action view appliesTo {
1860 principal : [User],
1861 resource: [Album,Photo]
1862 };
1863 "#;
1864
1865 let jstr = env.new_string(json_input).unwrap();
1866 let result = get_cedar_schema_internal(&mut env, jstr);
1867 assert!(
1868 result.is_err(),
1869 "Expected get_cedar_schema_internal to fail {:?}",
1870 result
1871 );
1872 }
1873
1874 #[test]
1875 fn get_json_schema_internal_valid() {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected