Search in sources :

Example 6 with Flaky

use of org.eclipse.xtext.testing.Flaky in project xtext-xtend by eclipse.

the class Bug437678Test method test_01.

@Flaky
@Test
public void test_01() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class A {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def methodA() {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _builder.append("class B {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def methodB() {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void myInstance(Object o) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("static extension B b");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("static String string");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def static void main(A it) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("method|");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _newBuilder.append(_builder.toString()).assertTextAtCursorPosition("ethod|", "methodA", "methodB", "main", "myInstance");
}
Also used : ContentAssistProcessorTestBuilder(org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Flaky(org.eclipse.xtext.testing.Flaky) AbstractXtendContentAssistBugTest(org.eclipse.xtend.ide.tests.contentassist.AbstractXtendContentAssistBugTest) Test(org.junit.Test)

Example 7 with Flaky

use of org.eclipse.xtext.testing.Flaky in project xtext-xtend by eclipse.

the class Bug437678Test method test_03.

@Flaky
@Test
public void test_03() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class A {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def methodA() {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _builder.append("class B {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def methodB() {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void myInstance(Object o) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("static extension B b");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("static String string");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def static void main(A a) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("method|");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _newBuilder.append(_builder.toString()).assertTextAtCursorPosition("ethod|", "methodB", "main()", "myInstance()");
}
Also used : ContentAssistProcessorTestBuilder(org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Flaky(org.eclipse.xtext.testing.Flaky) AbstractXtendContentAssistBugTest(org.eclipse.xtend.ide.tests.contentassist.AbstractXtendContentAssistBugTest) Test(org.junit.Test)

Example 8 with Flaky

use of org.eclipse.xtext.testing.Flaky in project xtext-xtend by eclipse.

the class Bug437678Test method test_05.

@Flaky
@Test
public void test_05() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class A {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def methodA() {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _builder.append("class B {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def methodB() {}");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def void myInstance(Object o) {}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _builder.append("class C {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("static extension B b");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("static String string");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def static void main(A a) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("a.method|");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _newBuilder.append(_builder.toString()).assertTextAtCursorPosition("ethod|", "methodA", "main", "myInstance");
}
Also used : ContentAssistProcessorTestBuilder(org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Flaky(org.eclipse.xtext.testing.Flaky) AbstractXtendContentAssistBugTest(org.eclipse.xtend.ide.tests.contentassist.AbstractXtendContentAssistBugTest) Test(org.junit.Test)

Example 9 with Flaky

use of org.eclipse.xtext.testing.Flaky in project xtext-xtend by eclipse.

the class Bug440069Test method test_03.

@Flaky
@Test
public void test_03() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class MyExtension {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def String getXyzManager(Object o) {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("return \'\'");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _builder.append("class MyTest {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("extension MyExtension = new MyExtension");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def test() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("xyzManage<|>");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _newBuilder.append(_builder.toString()).assertProposalAtCursor("xyzManager");
}
Also used : ContentAssistProcessorTestBuilder(org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Flaky(org.eclipse.xtext.testing.Flaky) AbstractXtendContentAssistBugTest(org.eclipse.xtend.ide.tests.contentassist.AbstractXtendContentAssistBugTest) Test(org.junit.Test)

Example 10 with Flaky

use of org.eclipse.xtext.testing.Flaky in project xtext-xtend by eclipse.

the class Bug440069Test method test_01.

@Flaky
@Test
public void test_01() throws Exception {
    ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("class MyExtension {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def String getXyzManager() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("return \'\'");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _builder.append("class MyTest {");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("extension MyExtension = new MyExtension");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("def test() {");
    _builder.newLine();
    _builder.append("\t\t");
    _builder.append("xyzManage<|>");
    _builder.newLine();
    _builder.append("\t");
    _builder.append("}");
    _builder.newLine();
    _builder.append("}");
    _builder.newLine();
    _newBuilder.append(_builder.toString()).assertProposalAtCursor("xyzManager");
}
Also used : ContentAssistProcessorTestBuilder(org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Flaky(org.eclipse.xtext.testing.Flaky) AbstractXtendContentAssistBugTest(org.eclipse.xtend.ide.tests.contentassist.AbstractXtendContentAssistBugTest) Test(org.junit.Test)

Aggregations

Flaky (org.eclipse.xtext.testing.Flaky)14 Test (org.junit.Test)14 AbstractXtendContentAssistBugTest (org.eclipse.xtend.ide.tests.contentassist.AbstractXtendContentAssistBugTest)13 StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)13 ContentAssistProcessorTestBuilder (org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder)13 IFile (org.eclipse.core.resources.IFile)1 IPath (org.eclipse.core.runtime.IPath)1