Skip to content

Commit 481b35d

Browse files
committed
Fix ParseCommandTest.
1 parent 1d139db commit 481b35d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

org.metaborg.spoofax.shell.core/src/main/java/org/metaborg/spoofax/shell/commands/ParseCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import org.metaborg.spoofax.core.syntax.ISpoofaxSyntaxService;
1212
import org.metaborg.spoofax.core.syntax.JSGLRParserConfiguration;
1313
import org.metaborg.spoofax.core.syntax.SpoofaxSyntaxService;
14+
import org.metaborg.spoofax.core.unit.ISpoofaxInputUnit;
1415
import org.metaborg.spoofax.core.unit.ISpoofaxParseUnit;
1516
import org.metaborg.spoofax.shell.hooks.IResultHook;
1617
import org.metaborg.spoofax.shell.output.IResultFactory;

org.metaborg.spoofax.shell.core/src/test/java/org/metaborg/spoofax/shell/commands/ParseCommandTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.metaborg.core.language.ILanguageImpl;
2121
import org.metaborg.core.project.IProject;
2222
import org.metaborg.core.syntax.ParseException;
23+
import org.metaborg.spoofax.core.shell.ShellFacet;
2324
import org.metaborg.spoofax.core.syntax.ISpoofaxSyntaxService;
2425
import org.metaborg.spoofax.core.unit.ISpoofaxParseUnit;
2526
import org.metaborg.spoofax.shell.hooks.IResultHook;
@@ -42,6 +43,7 @@ public class ParseCommandTest {
4243
private IResultHook resultHook;
4344
@Mock private IProject project;
4445
@Mock private ILanguageImpl lang;
46+
@Mock private ShellFacet facet;
4547

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

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

63-
when(resultFactory.createInputResult(any(), any(), any())).thenReturn(inputResult);
65+
when(resultFactory.createInputResult(any(), any(), any(), any())).thenReturn(inputResult);
6466
when(resultFactory.createParseResult(any())).thenReturn(parseResult);
6567

68+
when(lang.facet(ShellFacet.class)).thenReturn(facet);
69+
6670
parseCommand = new ParseCommand(syntaxService, resultHook, resultFactory, project, lang);
6771
}
6872

0 commit comments

Comments
 (0)