Skip to content

Conversation

alxkm
Copy link
Contributor

@alxkm alxkm commented Aug 29, 2025

Description

This PR enhances test coverage for the tool execution components in Spring AI, focusing on edge cases and boundary conditions that were previously untested.

Changes

DefaultToolExecutionResult Tests

  • Added test for immutable list handling in conversation history
  • Added test for multiple returnDirect() calls in builder pattern

ToolExecutionEligibilityPredicate Tests

  • Added test for empty generations in ChatResponse
  • Added test for model-based predicate with ModelCheckingPredicate implementation

ToolExecutionResult Tests

  • Added test for empty conversation history throwing exception
  • Added test for empty tool response list
  • Added test for null content in tool response
  • Added test for empty string content in tool response
  • Added test for builder without conversation history

These tests improve code reliability by

  • Increases test coverage for tool execution components
  • Covers previously untested edge cases and boundary conditions
  • Ensures robust error handling for invalid inputs

alxkm added 2 commits August 29, 2025 14:59
Signed-off-by: Oleksandr Klymenko <[email protected]>

Co-authored-by: Oleksandr Klymenko <[email protected]>
Signed-off-by: Oleksandr Klymenko <[email protected]>

Co-authored-by: Oleksandr Klymenko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant