MCPcopy Index your code
hub / github.com/AI45Lab/Code / test_builder_pattern

Function test_builder_pattern

core/src/hooks/matcher.rs:366–374  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

364
365 #[test]
366 fn test_builder_pattern() {
367 let matcher = HookMatcher::tool("Write")
368 .with_path("*.env")
369 .with_session("secure-session");
370
371 assert_eq!(matcher.tool, Some("Write".to_string()));
372 assert_eq!(matcher.path_pattern, Some("*.env".to_string()));
373 assert_eq!(matcher.session_id, Some("secure-session".to_string()));
374 }
375
376 #[test]
377 fn test_matcher_serialization() {

Callers

nothing calls this directly

Calls 2

with_sessionMethod · 0.80
with_pathMethod · 0.80

Tested by

no test coverage detected