|
|
|
Re: testing autocompletion (and other UI stuff) [message #960519 is a reply to message #957532] |
Sat, 27 October 2012 14:58 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Hi Vlad,
you should have a look at the org.eclipse.xtext.junit4 bundle. It
contains some useful utilities, e.g. the
ContentAssistProcessorTestBuilder, or the
AbstractContentAssistProcessorTest (and its subtypes).
It allows to write tests like this one (example for Xtext grammar CA tests):
@Test public void testCompleteAfterGrammarName_02() throws Exception {
newBuilder().append("grammar org.foo.bar ").assertText(
"with",
"Name",
"enum", "terminal",
"hidden",
"generate", "import");
}
Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 25.10.12 11:42, schrieb Vlad Dumitrescu:
> Hi!
>
> I am lost again in the Xtext jungle :)
>
> I want to test autocompletion and other UI stuff as part of the
> acceptance tests. I don't want to use UI tests for that, as they are too
> heavy. So I am targeting the language's service classes, for example the
> MylangProposalProvider.
>
> All well, but there is quite a lot of scaffolding: for example
> implementing a dummy ICompletionProposalAcceptor and such.
> Is there any support for making this easier? I suppose everybody has to
> do it and it's not language-specific.
>
> best regards,
> Vlad
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03408 seconds