()
| 494 | |
| 495 | #[test] |
| 496 | fn test_task_is_active() { |
| 497 | let pending = Task::new("1", "Pending task"); |
| 498 | let in_progress = Task::new("2", "In progress").with_status(TaskStatus::InProgress); |
| 499 | let completed = Task::new("3", "Completed").with_status(TaskStatus::Completed); |
| 500 | let failed = Task::new("4", "Failed").with_status(TaskStatus::Failed); |
| 501 | let cancelled = Task::new("5", "Cancelled").with_status(TaskStatus::Cancelled); |
| 502 | |
| 503 | assert!(pending.is_active()); |
| 504 | assert!(in_progress.is_active()); |
| 505 | assert!(!completed.is_active()); |
| 506 | assert!(!failed.is_active()); |
| 507 | assert!(!cancelled.is_active()); |
| 508 | } |
| 509 | |
| 510 | #[test] |
| 511 | fn test_task_serialization() { |
nothing calls this directly
no test coverage detected