Skip to content

Commit

Permalink
Fix ParseCommandTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfokkema committed Jun 5, 2016
1 parent 1d139db commit 1398eaf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.metaborg.core.language.ILanguageImpl;
import org.metaborg.core.project.IProject;
import org.metaborg.core.syntax.ParseException;
import org.metaborg.spoofax.core.shell.ShellFacet;
import org.metaborg.spoofax.core.syntax.ISpoofaxSyntaxService;
import org.metaborg.spoofax.core.unit.ISpoofaxParseUnit;
import org.metaborg.spoofax.shell.hooks.IResultHook;
Expand All @@ -42,6 +43,7 @@ public class ParseCommandTest {
private IResultHook resultHook;
@Mock private IProject project;
@Mock private ILanguageImpl lang;
@Mock private ShellFacet facet;

@Mock private InputResult inputResult;
@Mock private ParseResult parseResult;
Expand All @@ -60,9 +62,11 @@ public void setup() throws FileSystemException, ParseException {

when(project.location()).thenReturn(sourceFile);

when(resultFactory.createInputResult(any(), any(), any())).thenReturn(inputResult);
when(resultFactory.createInputResult(any(), any(), any(), any())).thenReturn(inputResult);
when(resultFactory.createParseResult(any())).thenReturn(parseResult);

when(lang.facet(ShellFacet.class)).thenReturn(facet);

parseCommand = new ParseCommand(syntaxService, resultHook, resultFactory, project, lang);
}

Expand Down

0 comments on commit 1398eaf

Please sign in to comment.