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

Commit d5d4a05

Browse files
author
Aleksi Salmela
committed
Fix the two tests that failed in travis.
1 parent 9b23cc8 commit d5d4a05

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void setGetWorkDir() {
7171
}
7272

7373
@Test
74-
public void backendInitWithoutCourse() {
74+
public void getCourseInfo() {
7575
mockStatic(CourseInfoIo.class);
7676

7777
CourseInfo info = null;
@@ -80,12 +80,11 @@ public void backendInitWithoutCourse() {
8080
when(workDir.getConfigFile()).thenReturn(null);
8181
CliContext ctx = new CliContext(io, null, workDir);
8282

83-
assertTrue(ctx.loadBackend());
8483
assertEquals(null, ctx.getCourseInfo());
8584
}
8685

8786
@Test
88-
public void backendInitWithCourse() {
87+
public void getCourseInfoWhenItDoesntExist() {
8988
mockStatic(CourseInfoIo.class);
9089

9190
CourseInfo info = mock(CourseInfo.class);
@@ -96,7 +95,6 @@ public void backendInitWithCourse() {
9695
when(workDir.getConfigFile()).thenReturn(path);
9796
CliContext ctx = new CliContext(io, null, workDir);
9897

99-
assertTrue(ctx.loadBackend());
10098
assertEquals(info, ctx.getCourseInfo());
10199
}
102100

0 commit comments

Comments
 (0)