Skip to content

Conversation

@alxkm
Copy link
Contributor

@alxkm alxkm commented Aug 6, 2025

Adds comprehensive test coverage across 3 critical Spring AI builder components:

PromptTemplateBuilderTests:

  • Whitespace validation - Ensures whitespace-only templates are rejected
  • Variable handling - Tests empty variables, null values, missing/partial variables
  • Template rendering - Validates complete variable substitution and empty string handling
  • Error scenarios - Confirms proper error messages for missing template variables

FilterExpressionBuilderTests:

  • Operator coverage - Tests all comparison operators
  • Complex expressions - Validates nested groups, NOT operations, and mixed data types
  • Edge cases - Handles null values, empty lists, special characters in keys
  • Real-world scenarios - Tests complex filter conditions for vector store queries

DocumentBuilderTests:

  • Input validation - Tests whitespace IDs, empty text, null media handling
  • Metadata management - Validates key-value pairs, map overrides, complex data types
  • Builder behavior - Tests text/metadata overwriting, ID generation priority
  • Builder reuse - Ensures proper state management across multiple builds

These tests make Spring AI more reliable by testing prompt templates, search filters, and document handling - preventing crashes and errors in AI applications.

@sobychacko sobychacko added this to the 1.1.0.M1 milestone Aug 6, 2025
@sobychacko sobychacko merged commit 9487817 into spring-projects:main Aug 6, 2025
2 checks passed
juntae6942 pushed a commit to juntae6942/spring-ai that referenced this pull request Aug 7, 2025
…g AI builders (spring-projects#4034)

Adds comprehensive test coverage across 3 critical Spring AI builder components:

- PromptTemplateBuilderTests
- FilterExpressionBuilderTests
- DocumentBuilderTests

Signed-off-by: Alex Klimenko <[email protected]>
scionaltera pushed a commit to scionaltera/spring-ai that referenced this pull request Sep 3, 2025
…g AI builders (spring-projects#4034)

Adds comprehensive test coverage across 3 critical Spring AI builder components:

- PromptTemplateBuilderTests
- FilterExpressionBuilderTests
- DocumentBuilderTests

Signed-off-by: Alex Klimenko <[email protected]>
chedim pushed a commit to couchbaselabs/spring-ai that referenced this pull request Sep 19, 2025
…g AI builders (spring-projects#4034)

Adds comprehensive test coverage across 3 critical Spring AI builder components:

- PromptTemplateBuilderTests
- FilterExpressionBuilderTests
- DocumentBuilderTests

Signed-off-by: Alex Klimenko <[email protected]>
Willam2004 pushed a commit to Willam2004/spring-ai that referenced this pull request Oct 11, 2025
…g AI builders (spring-projects#4034)

Adds comprehensive test coverage across 3 critical Spring AI builder components:

- PromptTemplateBuilderTests
- FilterExpressionBuilderTests
- DocumentBuilderTests

Signed-off-by: Alex Klimenko <[email protected]>
Signed-off-by: 家娃 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants