Skip to content

Commit 25c1568

Browse files
committed
Update method signatures to include LocalDate parameter
Adjusted the `extractTransaction` method in tests to require a `LocalDate` parameter. Updated relevant mock setups and test cases to align with the new method signature.
1 parent 911c974 commit 25c1568

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

learning/learning-module-llm/src/test/java/com/jongsoft/finance/llm/AiSuggestionEngineTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void extractTransaction() {
4949
var mockExtractionAgent = mock(TransactionExtractorAgent.class);
5050
var subject = new AiSuggestionEngine(mock(ClassificationEmbeddingStore.class), mock(ClassificationAgent.class), mockExtractionAgent);
5151

52-
when(mockExtractionAgent.extractTransaction(any(), anyString()))
52+
when(mockExtractionAgent.extractTransaction(any(), any(), anyString()))
5353
.thenReturn(new TransactionDTO(
5454
new AccountDTO(1L,"Checking account", "checking"),
5555
new AccountDTO(2L,"Savings account", "savings"),

learning/learning-module-llm/src/test/java/com/jongsoft/finance/llm/feature/TransactionExtractorAgentIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.slf4j.LoggerFactory;
2020

2121
import java.io.IOException;
22+
import java.time.LocalDate;
2223
import java.util.List;
2324
import java.util.UUID;
2425

@@ -47,7 +48,7 @@ private void testExtractionForLanguage(String language) throws IOException {
4748
prepareAccountMock(testCase.expected().fromAccount());
4849
prepareAccountMock(testCase.expected().toAccount());
4950
try {
50-
var extractedTransaction = transactionExtractorAgent.extractTransaction(UUID.randomUUID(), testCase.input());
51+
var extractedTransaction = transactionExtractorAgent.extractTransaction(UUID.randomUUID(), LocalDate.now(), testCase.input());
5152
var expectedTransaction = testCase.expected();
5253

5354
try {

0 commit comments

Comments
 (0)