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

Commit 020a78c

Browse files
author
Aleksi Salmela
committed
Make the submit command's methods private.
1 parent f708683 commit 020a78c

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/main/java/fi/helsinki/cs/tmc/cli/command/SubmitCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public void run(CommandLine args, Io io) {
160160
}
161161
}
162162

163-
protected void updateCourseJson(TmcCore core, List<Exercise> submittedExercises,
163+
private void updateCourseJson(TmcCore core, List<Exercise> submittedExercises,
164164
CourseInfo courseInfo, Path courseInfoFile) {
165165

166166
Course updatedCourse = TmcUtil.findCourse(core, courseInfo.getCourseName());
@@ -182,7 +182,7 @@ protected void updateCourseJson(TmcCore core, List<Exercise> submittedExercises,
182182
CourseInfoIo.save(courseInfo, courseInfoFile);
183183
}
184184

185-
protected void checkForExerciseUpdates(TmcCore core, Course course) {
185+
private void checkForExerciseUpdates(TmcCore core, Course course) {
186186
ExerciseUpdater exerciseUpdater = new ExerciseUpdater(core, course);
187187
if (!exerciseUpdater.updatesAvailable()) {
188188
return;

src/test/java/fi/helsinki/cs/tmc/cli/command/SubmitCommandTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,19 @@
1919
import fi.helsinki.cs.tmc.core.commands.GetUpdatableExercises.UpdateResult;
2020
import fi.helsinki.cs.tmc.core.domain.Course;
2121
import fi.helsinki.cs.tmc.core.domain.Exercise;
22-
import fi.helsinki.cs.tmc.core.domain.ProgressObserver;
2322
import fi.helsinki.cs.tmc.core.domain.submission.SubmissionResult;
2423

2524
import org.junit.Before;
2625
import org.junit.BeforeClass;
27-
import org.junit.Ignore;
2826
import org.junit.Test;
2927
import org.junit.runner.RunWith;
30-
import org.powermock.api.mockito.PowerMockito;
3128
import org.powermock.core.classloader.annotations.PrepareForTest;
3229
import org.powermock.modules.junit4.PowerMockRunner;
3330

3431
import java.nio.file.Path;
3532
import java.nio.file.Paths;
3633
import java.util.ArrayList;
3734
import java.util.List;
38-
import java.util.concurrent.Callable;
3935

4036
@RunWith(PowerMockRunner.class)
4137
@PrepareForTest({TmcUtil.class, CourseInfoIo.class})

0 commit comments

Comments
 (0)