Constructor and Configuration Tests
| 32 | |
| 33 | // Constructor and Configuration Tests |
| 34 | TEST_F(AnthropicClientTest, ConstructorWithValidApiKey) { |
| 35 | ai::anthropic::AnthropicClient client("sk-ant-validkey123", |
| 36 | "https://api.anthropic.com"); |
| 37 | |
| 38 | EXPECT_TRUE(client.is_valid()); |
| 39 | EXPECT_EQ(client.provider_name(), "anthropic"); |
| 40 | EXPECT_THAT(client.config_info(), testing::HasSubstr("Anthropic API")); |
| 41 | |
| 42 | // Test public interface access only |
| 43 | EXPECT_EQ(client.get_api_key(), "sk-ant-validkey123"); |
| 44 | EXPECT_EQ(client.get_base_url(), "https://api.anthropic.com"); |
| 45 | // Commented out internal method tests that don't exist: |
| 46 | // EXPECT_EQ(client.get_host(), "api.anthropic.com"); |
| 47 | // EXPECT_TRUE(client.get_use_ssl()); |
| 48 | } |
| 49 | |
| 50 | TEST_F(AnthropicClientTest, ConstructorWithEmptyApiKey) { |
| 51 | ai::anthropic::AnthropicClient client("", "https://api.anthropic.com"); |
nothing calls this directly
no test coverage detected