Skip to content

Commit

Permalink
[tests] Simplify the content assist test API.
Browse files Browse the repository at this point in the history
see #580

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Feb 14, 2017
1 parent 56715aa commit fcd0f67
Showing 1 changed file with 3 additions and 5 deletions.
Expand Up @@ -95,7 +95,7 @@ public final XtextResource getResourceFor(InputStream stream) {
String line = breader.readLine();
while (line != null) {
content.append(line);
content.append("\n");
content.append(getLineSeparator());
line = breader.readLine();
}
}
Expand Down Expand Up @@ -135,9 +135,7 @@ protected String getSuffix() {
* @throws Exception if the builder cannot be created.
*/
protected final ContentAssistProcessorTestBuilder newBuilder() throws Exception {
final ContentAssistProcessorTestBuilder.Factory factory = getInjector().getInstance(
ContentAssistProcessorTestBuilder.Factory.class);
ContentAssistProcessorTestBuilder builder = factory.create(this);
ContentAssistProcessorTestBuilder builder = new ContentAssistProcessorTestBuilder(getInjectedInjector(), this);
String prefix = getPrefix();
if (prefix.length() > 0) {
builder = builder.appendNl(prefix);
Expand Down Expand Up @@ -245,7 +243,7 @@ private static String toString(Object[] array) {
if (obj != null) {
buf.append(obj);
}
buf.append("\n");
buf.append(getLineSeparator());
}
}
return buf.toString();
Expand Down

0 comments on commit fcd0f67

Please sign in to comment.