Open lbiazotto opened 2 years ago
I have worked to create a sample application to put your code in and there are a number of pieces missing that it would be helpful if you could provide. For example, your test includes this:
def setup() {
service.ccbFilerService = Mock(CcbFilerService)
service.executionUtils = new ExecutionUtils(new SyncExecutor())
service.ccbFilerService.fileExporter = Mock(PdfExporter)
}
The service doesn't have all of those properties and it isn't clear if some of them are relevant. Also the generateCcb
method in your RegenerateCcbJobService
class will compile.
Can you share a minimal project that demonstrates the problem? If yes, that would be helpful.
Thank you for your feedback!
Expected Behavior
Domain classes:
Service:
I expect this unit test to pass:
Environment Test config in DataSource.groovy:
Actual Behaviour
The unit test fails because the method
Ccb.createCriteria().list
returns a empty list.Instead, if I filter by number attribute, something like this:
The method returns a list of 3 elements correctly.
And if I filter like this:
The method returns the element correctly!
The problem seems to be when filtering by
ID
and with thebeetwen
clause.Steps To Reproduce
No response
Environment Information
Example Application
No response
Version
2.5.6