use turboprop::mcp::{McpServer, McpServerConfig};
use turboprop::config::TurboPropConfig;
use tempfile::TempDir;
#[tokio::test]
async fn test_mcp_server_creation_with_search_tool_only() {
let temp_dir = TempDir::new().unwrap();
let config = TurboPropConfig::default();
let server = McpServer::new(temp_dir.path(), &config).await;
assert!(server.is_ok());
}
#[test]
fn test_mcp_server_config_default() {
let config = McpServerConfig::default();
assert_eq!(config.address, "127.0.0.1");
assert!(config.max_connections.value() > 0);
assert!(config.request_timeout.value() > 0);
}
#[tokio::test]
async fn test_server_tools_behavior_through_public_api() {
let temp_dir = TempDir::new().unwrap();
let config = TurboPropConfig::default();
let result = McpServer::new(temp_dir.path(), &config).await;
assert!(result.is_ok(), "Server should be created successfully with search tool");
}