MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_session_event_roundtrip

Function test_session_event_roundtrip

atomic-core/src/change/session.rs:1128–1139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1126
1127 #[test]
1128 fn test_session_event_roundtrip() {
1129 let original = sample_session_event();
1130 let bytes = original.to_bytes();
1131 let recovered = SessionEvent::from_bytes(&bytes).unwrap();
1132
1133 assert_eq!(original, recovered);
1134 assert_eq!(recovered.seq, 7);
1135 assert_eq!(recovered.event_kind, "fire");
1136 assert_eq!(recovered.place, Some("ready".into()));
1137 assert_eq!(recovered.transition, Some("plan_to_implement".into()));
1138 assert_eq!(recovered.record_type, Some("transition_fire".into()));
1139 }
1140
1141 // -- Edge cases --
1142

Callers

nothing calls this directly

Calls 3

sample_session_eventFunction · 0.85
to_bytesMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected