MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / test_optional_fields_omitted

Function test_optional_fields_omitted

crates/openshell-ocsf/src/format/jsonl.rs:84–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82
83 #[test]
84 fn test_optional_fields_omitted() {
85 let event = test_event();
86 let json = event.to_json().unwrap();
87
88 // Optional fields should not appear when None
89 assert!(json.get("device").is_none());
90 assert!(json.get("container").is_none());
91 assert!(json.get("unmapped").is_none());
92 assert!(json.get("status_detail").is_none());
93 }
94}

Callers

nothing calls this directly

Calls 2

to_jsonMethod · 0.80
test_eventFunction · 0.70

Tested by

no test coverage detected