4141class  CosmosDBChatMemoryRepositoryAutoConfigurationIT  {
4242
4343	private  final  ApplicationContextRunner  contextRunner  = new  ApplicationContextRunner ()
44- 			 .withConfiguration (AutoConfigurations .of (CosmosDBChatMemoryRepositoryAutoConfiguration .class ))
45- 			 .withPropertyValues (
46- 					 "spring.ai.chat.memory.repository.cosmosdb.endpoint="  + System .getenv ("AZURE_COSMOSDB_ENDPOINT" ))
47- 			 .withPropertyValues ("spring.ai.chat.memory.repository.cosmosdb.database-name=test-database" )
48- 			 .withPropertyValues ("spring.ai.chat.memory.repository.cosmosdb.container-name=autoconfig-test-container" );
44+ 		.withConfiguration (AutoConfigurations .of (CosmosDBChatMemoryRepositoryAutoConfiguration .class ))
45+ 		.withPropertyValues (
46+ 				"spring.ai.chat.memory.repository.cosmosdb.endpoint="  + System .getenv ("AZURE_COSMOSDB_ENDPOINT" ))
47+ 		.withPropertyValues ("spring.ai.chat.memory.repository.cosmosdb.database-name=test-database" )
48+ 		.withPropertyValues ("spring.ai.chat.memory.repository.cosmosdb.container-name=autoconfig-test-container" );
4949
5050	@ Test 
5151	void  addAndGet () {
@@ -71,28 +71,27 @@ void addAndGet() {
7171			assertThat (memory .findByConversationId (conversationId ).get (0 ).getMessageType ()).isEqualTo (MessageType .USER );
7272			assertThat (memory .findByConversationId (conversationId ).get (0 ).getText ()).isEqualTo ("test question" );
7373			assertThat (memory .findByConversationId (conversationId ).get (1 ).getMessageType ())
74- 					 .isEqualTo (MessageType .ASSISTANT );
74+ 				.isEqualTo (MessageType .ASSISTANT );
7575			assertThat (memory .findByConversationId (conversationId ).get (1 ).getText ()).isEqualTo ("test answer" );
7676		});
7777	}
7878
7979	@ Test 
8080	void  propertiesConfiguration () {
8181		this .contextRunner 
82- 				.withPropertyValues (
83- 						"spring.ai.chat.memory.repository.cosmosdb.endpoint=" 
84- 								+ System .getenv ("AZURE_COSMOSDB_ENDPOINT" ))
85- 				.withPropertyValues ("spring.ai.chat.memory.repository.cosmosdb.database-name=test-database" )
86- 				.withPropertyValues ("spring.ai.chat.memory.repository.cosmosdb.container-name=custom-testcontainer" )
87- 				.withPropertyValues ("spring.ai.chat.memory.repository.cosmosdb.partition-key-path=/customPartitionKey" )
88- 				.run (context  -> {
89- 					CosmosDBChatMemoryRepositoryProperties  properties  = context 
90- 							.getBean (CosmosDBChatMemoryRepositoryProperties .class );
91- 					assertThat (properties .getEndpoint ()).isEqualTo (System .getenv ("AZURE_COSMOSDB_ENDPOINT" ));
92- 					assertThat (properties .getDatabaseName ()).isEqualTo ("test-database" );
93- 					assertThat (properties .getContainerName ()).isEqualTo ("custom-testcontainer" );
94- 					assertThat (properties .getPartitionKeyPath ()).isEqualTo ("/customPartitionKey" );
95- 				});
82+ 			.withPropertyValues (
83+ 					"spring.ai.chat.memory.repository.cosmosdb.endpoint="  + System .getenv ("AZURE_COSMOSDB_ENDPOINT" ))
84+ 			.withPropertyValues ("spring.ai.chat.memory.repository.cosmosdb.database-name=test-database" )
85+ 			.withPropertyValues ("spring.ai.chat.memory.repository.cosmosdb.container-name=custom-testcontainer" )
86+ 			.withPropertyValues ("spring.ai.chat.memory.repository.cosmosdb.partition-key-path=/customPartitionKey" )
87+ 			.run (context  -> {
88+ 				CosmosDBChatMemoryRepositoryProperties  properties  = context 
89+ 					.getBean (CosmosDBChatMemoryRepositoryProperties .class );
90+ 				assertThat (properties .getEndpoint ()).isEqualTo (System .getenv ("AZURE_COSMOSDB_ENDPOINT" ));
91+ 				assertThat (properties .getDatabaseName ()).isEqualTo ("test-database" );
92+ 				assertThat (properties .getContainerName ()).isEqualTo ("custom-testcontainer" );
93+ 				assertThat (properties .getPartitionKeyPath ()).isEqualTo ("/customPartitionKey" );
94+ 			});
9695	}
9796
9897	@ Test 
0 commit comments