|
|
Re: testing custom validator - different behaviour for assertWarning() vs assertWarningContains()? [message #795736 is a reply to message #795191] |
Fri, 10 February 2012 21:40 |
Scott Finnie Messages: 94 Registered: October 2011 |
Member |
|
|
Thx Christian.
That explains first question but raises a second.
The method signature for the assertion is
org.eclipse.xtext.junit.validation.AssertableDiagnostics.assertError(int code)
However there's no corresponding signature in the validator that takes an int code. Closest is
org.eclipse.xtext.validation.AbstractDeclarativeValidator.error(String message, EObject source, EStructuralFeature feature, String code, String... issueData)
which takes a string. Do both 'code' params refer to the same conceptual thing - or are they different?
More generally, is there a recommended idiom for checking errors? Is the pragmatic answer just to use assertErrorContains()?
Thanks for your help.
PS: the documentation should probably be updated as the current example and subsequent text suggests the pattern in my OP. Is there somewhere I should raise that as a bug/feature req?
[Updated on: Fri, 10 February 2012 21:49] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02999 seconds