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

Function test_mock_context_provider

core/src/context/mod.rs:739–753  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

737
738 #[tokio::test]
739 async fn test_mock_context_provider() {
740 let provider = MockContextProvider::new("mock").with_items(vec![ContextItem::new(
741 "1",
742 ContextType::Resource,
743 "content",
744 )]);
745
746 assert_eq!(provider.name(), "mock");
747
748 let query = ContextQuery::new("test");
749 let result = provider.query(&query).await.unwrap();
750
751 assert_eq!(result.provider, "mock");
752 assert_eq!(result.items.len(), 1);
753 }
754
755 #[tokio::test]
756 async fn test_context_provider_on_turn_complete_default() {

Callers

nothing calls this directly

Calls 2

with_itemsMethod · 0.45
queryMethod · 0.45

Tested by

no test coverage detected