diff --git a/src/main/java/fi/helsinki/cs/tmc/core/commands/GetCourse.java b/src/main/java/fi/helsinki/cs/tmc/core/commands/GetCourse.java index 3b7dc803..58637f9e 100644 --- a/src/main/java/fi/helsinki/cs/tmc/core/commands/GetCourse.java +++ b/src/main/java/fi/helsinki/cs/tmc/core/commands/GetCourse.java @@ -61,7 +61,7 @@ public Course call() throws TmcCoreException, URISyntaxException { if (!course.isPresent()) { throw new TmcCoreException( - "Attempted to fetch nonexistent course " + urlWithApiVersion); + "Attempted to fetch nonexistent course " + urlWithApiVersion); } return course.get(); diff --git a/src/test/java/fi/helsinki/cs/tmc/core/commands/SubmitTest.java b/src/test/java/fi/helsinki/cs/tmc/core/commands/SubmitTest.java index 052ee0ae..67990a74 100644 --- a/src/test/java/fi/helsinki/cs/tmc/core/commands/SubmitTest.java +++ b/src/test/java/fi/helsinki/cs/tmc/core/commands/SubmitTest.java @@ -24,6 +24,7 @@ import fi.helsinki.cs.tmc.core.domain.Course; import fi.helsinki.cs.tmc.core.domain.ProgressObserver; import fi.helsinki.cs.tmc.core.domain.submission.SubmissionResult; +import fi.helsinki.cs.tmc.core.exceptions.ExpiredException; import fi.helsinki.cs.tmc.core.exceptions.TmcCoreException; import fi.helsinki.cs.tmc.core.testhelpers.ExampleJson; @@ -185,7 +186,7 @@ public void submitWithTmcCore() throws Exception { } @Test - public void testSubmissionWithObserver() throws Exception{ + public void testSubmissionWithObserver() throws Exception { when(submitterMock.submit(eq(path), eq(observer))).thenReturn(URI.create("xkcd.com")); submitWithObserver.call(); verify(submitterMock).submit(eq(path), eq(observer)); diff --git a/src/test/java/fi/helsinki/cs/tmc/core/communication/ExerciseSubmitterTest.java b/src/test/java/fi/helsinki/cs/tmc/core/communication/ExerciseSubmitterTest.java index f214d263..8f2f67be 100644 --- a/src/test/java/fi/helsinki/cs/tmc/core/communication/ExerciseSubmitterTest.java +++ b/src/test/java/fi/helsinki/cs/tmc/core/communication/ExerciseSubmitterTest.java @@ -139,8 +139,8 @@ public void testSubmitWithOneParam() this.courseSubmitter = new ExerciseSubmitter(rootFinder, langs, urlCommunicator, tmcApi, settings); rootFinder.setReturnValue(testPath); - URI submissionPath = URI.create( - "http://127.0.0.1:8080/submissions/1781.json?api_version=7"); + URI submissionPath = URI.create + ("http://127.0.0.1:8080/submissions/1781.json?api_version=7"); URI result = courseSubmitter.submit(testPath); assertEquals(submissionPath, result); } @@ -316,8 +316,8 @@ public void testSubmitterUsesProgressObserverIfGiven() throws Exception { this.courseSubmitter = new ExerciseSubmitter(rootFinder, langs, urlCommunicator, tmcApi, settings); rootFinder.setReturnValue(testPath); - URI submissionPath = URI.create( - "http://127.0.0.1:8080/submissions/1781.json?api_version=7"); + URI submissionPath = URI.create + ("http://127.0.0.1:8080/submissions/1781.json?api_version=7"); URI result = courseSubmitter.submit(testPath, observer); verify(observer).progress("zipping exercise"); verify(observer).progress("submitting exercise"); diff --git a/src/test/java/fi/helsinki/cs/tmc/core/communication/SubmissionPollerTest.java b/src/test/java/fi/helsinki/cs/tmc/core/communication/SubmissionPollerTest.java index cfcbeaa3..5e6f79bb 100644 --- a/src/test/java/fi/helsinki/cs/tmc/core/communication/SubmissionPollerTest.java +++ b/src/test/java/fi/helsinki/cs/tmc/core/communication/SubmissionPollerTest.java @@ -25,7 +25,7 @@ public class SubmissionPollerTest { private SubmissionPoller submissionPoller; private URI url = URI.create( - "https://tmc.mooc.fi/staging/submissions/1764.json?api_version=7&client=tmc_cli&client_version=1"); + "https://example.com/staging/submissions/1764.json?api_version=7&client=tmc_cli&client_version=1"); private CoreTestSettings settings; private TmcApi tmcApi; diff --git a/src/test/java/fi/helsinki/cs/tmc/core/domain/ReviewTest.java b/src/test/java/fi/helsinki/cs/tmc/core/domain/ReviewTest.java index 1f8490d9..cb25bfaa 100644 --- a/src/test/java/fi/helsinki/cs/tmc/core/domain/ReviewTest.java +++ b/src/test/java/fi/helsinki/cs/tmc/core/domain/ReviewTest.java @@ -32,7 +32,7 @@ public class ReviewTest { private static final URI updateUrl = - URI.create("http://test.mooc.duck.fi/courses/47/reviews/8"); + URI.create("http://example.com/courses/47/reviews/8"); private static final URI putUrl = URI.create(updateUrl + ".json?api_version=7"); private Review review;