Files
cleveragents-core/features/google_provider.feature
T

39 lines
2.4 KiB
Gherkin

Feature: Google provider adapter coverage
As a maintainer validating real provider adapters
I want Behave scenarios for the Google chat provider
So that constructor guards and LangChain handoffs stay regression tested
@unit @providers @google
Scenario: Google provider instantiates ChatGoogleGenerativeAI with provided credentials
Given I have sample provider domain inputs
When I create a Google chat provider with API key "sk-google-unit" and model "gemini-2.0-flash"
And I request plan generation from the Google provider
Then the Google provider should construct ChatGoogleGenerativeAI with api key "sk-google-unit" and model "gemini-2.0-flash"
And the Google provider metadata should report name "google" and model "gemini-2.0-flash"
@unit @providers @google
Scenario: Google provider forwards extra kwargs to ChatGoogleGenerativeAI
Given I have sample provider domain inputs
And I set the Google provider extra kwargs "temperature=0.25,max_output_tokens=2048"
When I create a Google chat provider with API key "sk-google-unit" and model "gemini-2.0-pro"
And I request plan generation from the Google provider
Then the Google provider should construct ChatGoogleGenerativeAI with api key "sk-google-unit" and model "gemini-2.0-pro"
And the Google provider should include kwargs "temperature=0.25,max_output_tokens=2048" in the ChatGoogleGenerativeAI call
And the Google provider metadata should report name "google" and model "gemini-2.0-pro"
@unit @providers @google
Scenario: Google provider returns generated changes with token count
Given I have sample provider domain inputs
And the plan generation graph returns a generated change for "app/google_provider.py"
And the Google provider token estimator returns 256 tokens
When I create a Google chat provider with API key "sk-google-unit" and model "gemini-2.0-flash"
And I request plan generation from the Google provider
Then the Google provider response should include 1 generated change for "app/google_provider.py"
And the Google provider response token count should equal 256
@unit @providers @google
Scenario: Google provider rejects missing API key
Given I have sample provider domain inputs
When I attempt to create a Google chat provider without an API key
Then the Google provider creation should fail with error "Google API key is required"