MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_task_builder

Function test_task_builder

core/src/planning/mod.rs:477–493  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

475
476 #[test]
477 fn test_task_builder() {
478 let task = Task::new("1", "Test task")
479 .with_priority(TaskPriority::High)
480 .with_status(TaskStatus::InProgress)
481 .with_tool("bash")
482 .with_dependencies(vec!["step-0".to_string()])
483 .with_success_criteria("Command exits with 0");
484
485 assert_eq!(task.priority, TaskPriority::High);
486 assert_eq!(task.status, TaskStatus::InProgress);
487 assert_eq!(task.tool, Some("bash".to_string()));
488 assert_eq!(task.dependencies, vec!["step-0".to_string()]);
489 assert_eq!(
490 task.success_criteria,
491 Some("Command exits with 0".to_string())
492 );
493 }
494
495 #[test]
496 fn test_task_is_active() {

Callers

nothing calls this directly

Calls 5

with_success_criteriaMethod · 0.80
with_dependenciesMethod · 0.80
with_toolMethod · 0.45
with_statusMethod · 0.45
with_priorityMethod · 0.45

Tested by

no test coverage detected