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

Function test_finding_info_creation

crates/openshell-ocsf/src/objects/finding.rs:88–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86
87 #[test]
88 fn test_finding_info_creation() {
89 let info = FindingInfo::new("nssh1-replay-abc", "NSSH1 Nonce Replay Attack")
90 .with_desc("A nonce was replayed.");
91 let json = serde_json::to_value(&info).unwrap();
92 assert_eq!(json["uid"], "nssh1-replay-abc");
93 assert_eq!(json["title"], "NSSH1 Nonce Replay Attack");
94 assert_eq!(json["desc"], "A nonce was replayed.");
95 }
96
97 #[test]
98 fn test_evidence_from_pairs() {

Callers

nothing calls this directly

Calls 1

with_descMethod · 0.80

Tested by

no test coverage detected