EditorTestCase: How to test that an intention is not applicable
Hi,
I'm currently testing intentions of my project by using EditorTestCases.
It's easy to test against the outcome of an intention invocation, but now I need to test that an intention is NOT applicable in a specific context and I can't find an elegant solution for this problem.
Does anybody know a good approach to test this in MPS?
Thank you in advance and best regards
Tobias
Please sign in to leave a comment.
IntentionsManager.getInstance().getAvailableIntentions(...) will provide the intentions available on that given node and editorcontext.
Thank you very much.
I've found another alternative for this kind of test case. You can just use this expression in your EditorTestCase:
This will return a boolean value whether the intention is applicable or not.