use of org.eclipse.xtext.xbase.imports.RewritableImportSection in project xtext-xtend by eclipse.
the class AbstractRewritableImportSectionTest method testSimpleRemove.
@Test
public void testSimpleRemove() {
final RewritableImportSection section = this.getSection(List.class, Set.class);
this.removeImport(section, Set.class);
StringConcatenation _builder = new StringConcatenation();
_builder.append("import java.util.List");
_builder.newLine();
this.assertEquals(section, _builder);
}
use of org.eclipse.xtext.xbase.imports.RewritableImportSection in project xtext-xtend by eclipse.
the class AbstractRewritableImportSectionTest method testRemoveAdd.
@Test
public void testRemoveAdd() {
final RewritableImportSection section = this.getSection(List.class);
this.removeImport(section, List.class);
this.addImport(section, List.class);
StringConcatenation _builder = new StringConcatenation();
_builder.append("import java.util.List");
_builder.newLine();
this.assertEquals(section, _builder);
}
use of org.eclipse.xtext.xbase.imports.RewritableImportSection in project xtext-xtend by eclipse.
the class AbstractRewritableImportSectionTest method testRemoveAddRemoveAdd.
@Test
public void testRemoveAddRemoveAdd() {
final RewritableImportSection section = this.getSection(List.class);
this.removeImport(section, List.class);
this.addImport(section, List.class);
this.removeImport(section, List.class);
this.addImport(section, List.class);
StringConcatenation _builder = new StringConcatenation();
_builder.append("import java.util.List");
_builder.newLine();
this.assertEquals(section, _builder);
}
use of org.eclipse.xtext.xbase.imports.RewritableImportSection in project xtext-xtend by eclipse.
the class AbstractRewritableImportSectionTest method testRemoveAll.
@Test
public void testRemoveAll() {
final RewritableImportSection section = this.getSection(List.class, Set.class);
this.removeImport(section, Set.class);
this.removeImport(section, List.class);
StringConcatenation _builder = new StringConcatenation();
this.assertEquals(section, _builder);
}
use of org.eclipse.xtext.xbase.imports.RewritableImportSection in project xtext-xtend by eclipse.
the class AbstractRewritableImportSectionTest method testSimpleAddAsString_1.
@Test
public void testSimpleAddAsString_1() {
final RewritableImportSection section = this.getSection(Set.class);
section.addImport("org.eclipse.xtext.xbase.lib.InputOutput");
StringConcatenation _builder = new StringConcatenation();
_builder.append("import java.util.Set");
_builder.newLine();
this.assertEquals(section, _builder);
}
Aggregations