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

Function test_session_event_roundtrip

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

Source from the content-addressed store, hash-verified

621
622 #[test]
623 fn test_session_event_roundtrip() {
624 let original = sample_session_event();
625 let bytes = original.to_bytes();
626 let recovered = SessionEvent::from_bytes(&bytes).unwrap();
627
628 assert_eq!(original, recovered);
629 assert_eq!(recovered.seq, 7);
630 assert_eq!(recovered.event_kind, "fire");
631 assert_eq!(recovered.place, Some("ready".into()));
632 assert_eq!(recovered.transition, Some("plan_to_implement".into()));
633 assert_eq!(recovered.record_type, Some("transition_fire".into()));
634 }
635
636 // -- Edge cases --
637

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