// tests/default/cancel_token.rs use event_handlers_types::default::{CancelToken, Cancelable}; #[test] fn cancel_token_should_not_be_canceled_by_default() { // Arrange let cancel_token = CancelToken::default(); // Act & Assert assert!(!cancel_token.is_canceled().unwrap()); } #[test] fn cancel_token_should_be_cancelable() { // Arrange let mut cancel_token = CancelToken::default(); // Act cancel_token.cancel(); // Assert assert!(cancel_token.is_canceled().unwrap()); } #[test] fn cancel_token_clone_should_reflect_canceled_state() { // Arrange let mut original = CancelToken::default(); let cloned = original.clone(); // Act original.cancel(); // Assert assert!(original.is_canceled().unwrap()); assert!(cloned.is_canceled().unwrap()); // The cloned token should also reflect the canceled state. }