-
Notifications
You must be signed in to change notification settings - Fork 242
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
[DROOLS-4636] Update Scenario Cheatsheet to mention MVEL and Background #1277
Changes from 2 commits
b38fda3
5a7ad90
c6c3de8
34f103c
6f3678c
6dc93f1
b24ca2b
90e0498
ccec49c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,3 +189,6 @@ validationSucceed=Validation Succeed | |
|
||
backgroundTabTitle=Background | ||
backgroundErrorNotification=There are errors in Background data, please have a look | ||
ruleCheatSheet23=To specify a MVEL expression (or invoke a Java method) just put # at the beginning of the expression. In GIVEN section, return type of the expression has to be the same one of type of the column. In EXPECT section the type could also just a boolean with the result of the assertion and you can use actualValue identifier to access value to check. | ||
ruleCheatSheetBackground=If the same GIVEN data is shared by multiple test scenarios, you can use the Background tab to define them once. You can create a column in Background in the same way of Model | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't it end with '.'? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
dmnCheatSheetBackground=If the same GIVEN data is shared by multiple test scenarios, you can use the Background tab to define them once. You can create a column in Background in the same way of Model. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If dmnCheatSheetBackground and ruleCheatSheetBackground are the same cannot we have only one? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @danielezonca I agree with @dupliaka, I suggest to define a separate method (eg. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have removed the duplication ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also since we discussed it with you @danielezonca the dmn and drl bkg are not the same; |
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.
Are you sure that we shell mention all of the limitation for expressions?
Bcs we are obviosly do not mention that if you will /0 the expression will fall, why should we mention about the return type? Just my feeling of the cheat sheet idea. I would like to only mention a key words.
# specifies expression you can use to invoke Java code.
actualValue specifies parameter for assertion in EXPECT.
But if you have other ideas...
If you really want to leave it here a shorten version of it as well:
Return type of the expression in GIVEN section should be the same as type of the column.
Return type of the expression in EXPECT section should be boolean assertion result.
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.
I can remove the additional information but I think it could be useful to have them here. I cannot user your suggested version because in EXPECT expression can return the same type (and in this case it will be verified as
==
to the actualValue) or a boolean so I mentioned bothThere 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.
Ok, what about using /expression? Coz we are no need to put # before the expression for those column.