Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit b35b803

Browse files
author
Aleksi Salmela
committed
Don't run the auto-update in the cli-context tests.
1 parent e3c54d7 commit b35b803

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/test/java/fi/helsinki/cs/tmc/cli/CliContextTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616

1717
public class CliContextTest {
1818

19+
private TestIo io;
20+
1921
@Before
2022
public void setUp() {
23+
io = new TestIo();
2124
}
2225

2326
@Test
@@ -35,22 +38,22 @@ public void getIoWhenItsNotGiven() {
3538

3639
@Test
3740
public void setAppAndGetIt() {
38-
CliContext ctx = new CliContext(null);
41+
CliContext ctx = new CliContext(io);
3942
Application app = new Application(ctx);
4043
ctx.setApp(app);
4144
assertEquals(app, ctx.getApp());
4245
}
4346

4447
@Test(expected = RuntimeException.class)
4548
public void getAppWithoutSettingIt() {
46-
CliContext ctx = new CliContext(null);
49+
CliContext ctx = new CliContext(io);
4750
assertNull(ctx.getApp());
4851
}
4952

5053
@Test
5154
public void setGetWorkDir() {
5255
WorkDir workDir = new WorkDir();
53-
CliContext ctx = new CliContext(null, null, workDir);
56+
CliContext ctx = new CliContext(io, null, workDir);
5457
assertEquals(workDir, ctx.getWorkDir());
5558
}
5659

0 commit comments

Comments
 (0)