-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/nw23001440/262 mock oc feod #474
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we implement mock statement like this we have no idea if a codop works because is good or because is silly :-).
My proposal is:
- Define a
MockStatement
empty interface - All mocked statements should implement that interface
- Define a new callback function
JarikoCallback.onMockStatement: (mockStatement: MockStatement) -> Unit
with default implementation:System.err.println("Executing mock.... bla bla bla...");
- Before of statement.execute if statement is
MockStatement
invokeMainExecutionContext.getConfiguration().jarikoCallback.onMockStatement(statement)
This way we can log this warning but in addition, we are able to delegate something other to make blocking the codop mock implementation.
If you want to speak at voice I am here.
Could |
Yes
Il giorno ven 22 mar 2024 alle ore 15:49 Davide ***@***.***>
ha scritto:
… If we implement mock statement like this we have no idea if a codop works
because is good or because is silly :-). My proposal is:
* Define a `MockStatement` empty interface
* All mocked statements should implement that interface
* Define a new callback function `JarikoCallback.onMockStatement: (mockStatement: MockStatement) -> Unit` with default implementation: `System.err.println("Executing mock.... bla bla bla...");`
* Before of [statement.execute](https://github.com/smeup/jariko/blob/fa7fc7b84c989c64e7dc713a9f68f8ff7d2645f3/rpgJavaInterpreter-core/src/main/kotlin/com/smeup/rpgparser/interpreter/internal_interpreter.kt#L414) if statement is `MockStatement` invoke `MainExecutionContext.getConfiguration().jarikoCallback.onMockStatement(statement)`
This way we can log this warning but in addition, we are able to delegate
something other to make blocking the codop mock implementation.
If you want to speak at voice I am here.
Could MockStatement extends Statement?
—
Reply to this email directly, view it on GitHub
<#474 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJR622U5LXEDJD4G6CR6KI3YZRAG5AVCNFSM6AAAAABFDK2QEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJVGI3DMNZWG4>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
--
[image: smeup] <https://www.smeup.com>
Marco Lanari
R&D Department - Developer
Office: 0521940611 <00390521940611>
www.smeup.com
*SMEUP LAB SRL*
Via Carra, 8 - 43122 Parma (PR)
[image: smeup] <https://bit.ly/43hyvY0>
|
…`, `Unlock`, `Feod` classes
…`, `Unlock`, `Feod` classes
Ok, the idea is perfect and clean. Check new commits |
Description
Firstly, for this task was created an interface for those operators mocked, with a refactoring of previous implementation. Then, created the
FeodStmt
so that Jariko no longer crashes.Checklist:
./gradlew ktlintCheck
)./gradlew check
)docs
directory