diff --git a/services/git-bridge/src/uk/ac/ic/wlgitbridge/application/SnapshotPushPostbackHandler.java b/services/git-bridge/src/uk/ac/ic/wlgitbridge/application/SnapshotPushPostbackHandler.java index 56985926e0..58960b82ee 100644 --- a/services/git-bridge/src/uk/ac/ic/wlgitbridge/application/SnapshotPushPostbackHandler.java +++ b/services/git-bridge/src/uk/ac/ic/wlgitbridge/application/SnapshotPushPostbackHandler.java @@ -24,10 +24,6 @@ public class SnapshotPushPostbackHandler extends AbstractHandler { @Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { -// System.out.println("handling"); -// System.out.println(request.getMethod()); -// response.setContentType("text/html;charset=utf-8"); -// response.setStatus(HttpServletResponse.SC_OK); if (request.getMethod().equals("POST") && request.getPathInfo().endsWith("postback")) { String contents = getContentsOfReader(request.getReader()); String projectName = request.getRequestURI().split("/")[1]; diff --git a/services/git-bridge/src/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotAttachment.java b/services/git-bridge/src/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotAttachment.java index 64fce0b89e..a6efebbede 100644 --- a/services/git-bridge/src/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotAttachment.java +++ b/services/git-bridge/src/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotAttachment.java @@ -2,22 +2,12 @@ package uk.ac.ic.wlgitbridge.writelatex.api.request.getforversion; import com.google.gson.JsonArray; import com.google.gson.JsonElement; -import com.ning.http.client.AsyncCompletionHandler; -import com.ning.http.client.AsyncHttpClient; -import com.ning.http.client.HttpResponseBodyPart; -import com.ning.http.client.Response; -import uk.ac.ic.wlgitbridge.writelatex.api.request.exception.FailedConnectionException; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.util.concurrent.Future; /** * Created by Winston on 06/11/14. */ public class SnapshotAttachment extends SnapshotFile { - private Future future; private String url; public SnapshotAttachment(JsonElement json) { @@ -27,43 +17,11 @@ public class SnapshotAttachment extends SnapshotFile { @Override public byte[] getContents() { return null; -// try { -// return future.get(); -// } catch (InterruptedException e) { -// throw new FailedConnectionException(); -// } catch (ExecutionException e) { -// throw new FailedConnectionException(); -// } } @Override protected void getContentsFromJSON(JsonArray jsonArray) { url = jsonArray.get(0).getAsString(); -// fetchContents(jsonArray.get(0).getAsString()); - } - - private void fetchContents(String url) throws FailedConnectionException { - AsyncHttpClient asyncHttpClient = new AsyncHttpClient(); - try { - future = asyncHttpClient.prepareGet(url).execute(new AsyncCompletionHandler() { - - ByteArrayOutputStream bytes = new ByteArrayOutputStream(); - - @Override - public STATE onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception { - bytes.write(bodyPart.getBodyPartBytes()); - return STATE.CONTINUE; - } - - @Override - public byte[] onCompleted(Response response) throws Exception { - return bytes.toByteArray(); - } - - }); - } catch (IOException e) { - throw new FailedConnectionException(); - } } public String getUrl() { diff --git a/services/git-bridge/src/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/InvalidProjectException.java b/services/git-bridge/src/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/InvalidProjectException.java index eab10e4ecf..a24188360a 100644 --- a/services/git-bridge/src/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/InvalidProjectException.java +++ b/services/git-bridge/src/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/InvalidProjectException.java @@ -1,8 +1,9 @@ package uk.ac.ic.wlgitbridge.writelatex.api.request.push.exception; +import com.google.gson.JsonArray; import com.google.gson.JsonElement; -import java.util.Arrays; +import java.util.LinkedList; import java.util.List; /** @@ -10,10 +11,7 @@ import java.util.List; */ public class InvalidProjectException extends SnapshotPostException { - private static final String[] DESCRIPTION_LINES = { - "Your WriteLatex project is too big.", - "Delete some files and try again.." - }; + private LinkedList descriptionLines; public InvalidProjectException(JsonElement jsonElement) { super(jsonElement); @@ -26,12 +24,16 @@ public class InvalidProjectException extends SnapshotPostException { @Override public List getDescriptionLines() { - return Arrays.asList(DESCRIPTION_LINES); + return descriptionLines; } @Override public void fromJSON(JsonElement json) { - + descriptionLines = new LinkedList(); + JsonArray errors = json.getAsJsonObject().get("errors").getAsJsonArray(); + for (JsonElement error : errors) { + descriptionLines.add(error.getAsString()); + } } } diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/MainTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/MainTest.java similarity index 85% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/MainTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/MainTest.java index f555531a0a..1d41019063 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/MainTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/MainTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 02/11/14. */ -public class MainTests { +public class MainTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/AttsResourceHandlerTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/AttsResourceHandlerTest.java new file mode 100644 index 0000000000..9674b35f13 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/AttsResourceHandlerTest.java @@ -0,0 +1,12 @@ +package uk.ac.ic.wlgitbridge.application; + +import org.junit.Test; + +public class AttsResourceHandlerTest { + + @Test + public void testHandle() throws Exception { + + } + +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/SnapshotPushPostbackContentsTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/SnapshotPushPostbackContentsTest.java new file mode 100644 index 0000000000..73031cc87b --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/SnapshotPushPostbackContentsTest.java @@ -0,0 +1,17 @@ +package uk.ac.ic.wlgitbridge.application; + +import org.junit.Test; + +public class SnapshotPushPostbackContentsTest { + + @Test + public void testFromJSON() throws Exception { + + } + + @Test + public void testProcessPostback() throws Exception { + + } + +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/SnapshotPushPostbackHandlerTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/SnapshotPushPostbackHandlerTest.java new file mode 100644 index 0000000000..ae1e48b147 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/SnapshotPushPostbackHandlerTest.java @@ -0,0 +1,12 @@ +package uk.ac.ic.wlgitbridge.application; + +import org.junit.Test; + +public class SnapshotPushPostbackHandlerTest { + + @Test + public void testHandle() throws Exception { + + } + +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/WLGitBridgeApplicationTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/WLGitBridgeApplicationTest.java similarity index 90% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/application/WLGitBridgeApplicationTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/application/WLGitBridgeApplicationTest.java index 5bf1ec3203..06938952c5 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/WLGitBridgeApplicationTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/WLGitBridgeApplicationTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 02/11/14. */ -public class WLGitBridgeApplicationTests { +public class WLGitBridgeApplicationTest { @Test public void diesIfLessThanTwoArguments() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/WLGitBridgeServerTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/WLGitBridgeServerTest.java similarity index 81% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/application/WLGitBridgeServerTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/application/WLGitBridgeServerTest.java index 64e444a4da..f39a5b0e98 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/WLGitBridgeServerTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/WLGitBridgeServerTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 02/11/14. */ -public class WLGitBridgeServerTests { +public class WLGitBridgeServerTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/exception/InvalidProgramArgumentsExceptionTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/exception/InvalidProgramArgumentsExceptionTest.java similarity index 76% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/application/exception/InvalidProgramArgumentsExceptionTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/application/exception/InvalidProgramArgumentsExceptionTest.java index aee4ceaedd..f83e9ddf2e 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/exception/InvalidProgramArgumentsExceptionTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/exception/InvalidProgramArgumentsExceptionTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 03/11/14. */ -public class InvalidProgramArgumentsExceptionTests { +public class InvalidProgramArgumentsExceptionTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/jetty/NullLoggerTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/jetty/NullLoggerTest.java similarity index 84% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/application/jetty/NullLoggerTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/application/jetty/NullLoggerTest.java index a68638c21d..759c7b05ca 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/jetty/NullLoggerTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/application/jetty/NullLoggerTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 03/11/14. */ -public class NullLoggerTests { +public class NullLoggerTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/bridge/WLBridgedProjectTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/bridge/WLBridgedProjectTest.java similarity index 85% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/bridge/WLBridgedProjectTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/bridge/WLBridgedProjectTest.java index 334613cf88..f9d02d7c82 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/bridge/WLBridgedProjectTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/bridge/WLBridgedProjectTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 05/11/14. */ -public class WLBridgedProjectTests { +public class WLBridgedProjectTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/WLGitServletConfigTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/WLGitServletConfigTests.java deleted file mode 100644 index 5cf6d6e317..0000000000 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/WLGitServletConfigTests.java +++ /dev/null @@ -1,15 +0,0 @@ -package uk.ac.ic.wlgitbridge.git; - -import org.junit.Test; - -/** - * Created by Winston on 02/11/14. - */ -public class WLGitServletConfigTests { - - @Test - public void nothingToTest() { - - } - -} diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/WLGitServletTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/WLGitServletTests.java deleted file mode 100644 index bd97cb9b4f..0000000000 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/WLGitServletTests.java +++ /dev/null @@ -1,15 +0,0 @@ -package uk.ac.ic.wlgitbridge.git; - -import org.junit.Test; - -/** - * Created by Winston on 02/11/14. - */ -public class WLGitServletTests { - - @Test - public void nothingToTest() { - - } - -} diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLReceivePackFactoryTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLReceivePackFactoryTest.java similarity index 80% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLReceivePackFactoryTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLReceivePackFactoryTest.java index f1afabefd1..37f81f8946 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLReceivePackFactoryTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLReceivePackFactoryTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 02/11/14. */ -public class WLReceivePackFactoryTests { +public class WLReceivePackFactoryTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLRepositoryResolverTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLRepositoryResolverTest.java similarity index 80% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLRepositoryResolverTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLRepositoryResolverTest.java index 538dd2fafb..7c0c2aa951 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLRepositoryResolverTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLRepositoryResolverTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 02/11/14. */ -public class WLRepositoryResolverTests { +public class WLRepositoryResolverTest { @Test public void joinsFilePathsTogether() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLUploadPackTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLUploadPackTest.java similarity index 83% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLUploadPackTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLUploadPackTest.java index 93de41ea0f..fe98bd1589 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLUploadPackTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/WLUploadPackTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 02/11/14. */ -public class WLUploadPackTests { +public class WLUploadPackTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/hook/CheckNonFastForwardHookTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/hook/WriteLatexPutHookTest.java similarity index 79% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/hook/CheckNonFastForwardHookTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/hook/WriteLatexPutHookTest.java index 34a3a475da..3f9eea6745 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/hook/CheckNonFastForwardHookTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/hook/WriteLatexPutHookTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 03/11/14. */ -public class CheckNonFastForwardHookTests { +public class WriteLatexPutHookTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/hook/exception/ForcedPushExceptionTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/hook/exception/ForcedPushExceptionTest.java new file mode 100644 index 0000000000..2d1615502f --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/handler/hook/exception/ForcedPushExceptionTest.java @@ -0,0 +1,22 @@ +package uk.ac.ic.wlgitbridge.git.handler.hook.exception; + +import org.junit.Test; + +public class ForcedPushExceptionTest { + + @Test + public void testGetMessage() throws Exception { + + } + + @Test + public void testGetDescriptionLines() throws Exception { + + } + + @Test + public void testFromJSON() throws Exception { + + } + +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/servlet/WLGitServletConfigTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/servlet/WLGitServletConfigTest.java new file mode 100644 index 0000000000..419b1f553a --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/servlet/WLGitServletConfigTest.java @@ -0,0 +1,12 @@ +package uk.ac.ic.wlgitbridge.git.servlet; + +import org.junit.Test; + +public class WLGitServletConfigTest { + + @Test + public void nothingToTest() { + + } + +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/servlet/WLGitServletTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/servlet/WLGitServletTest.java new file mode 100644 index 0000000000..76b3025aff --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/servlet/WLGitServletTest.java @@ -0,0 +1,12 @@ +package uk.ac.ic.wlgitbridge.git.servlet; + +import org.junit.Test; + +public class WLGitServletTest { + + @Test + public void nothingToTest() { + + } + +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/util/FileDirectoryContentsTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/util/FileDirectoryContentsTest.java new file mode 100644 index 0000000000..c20daa1945 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/util/FileDirectoryContentsTest.java @@ -0,0 +1,13 @@ +package uk.ac.ic.wlgitbridge.git.util; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class FileDirectoryContentsTest { + + @Test + public void testGetFileContentsTable() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/util/RepositoryObjectTreeWalkerTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/util/RepositoryObjectTreeWalkerTest.java new file mode 100644 index 0000000000..fd11f49b88 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/git/util/RepositoryObjectTreeWalkerTest.java @@ -0,0 +1,11 @@ +package uk.ac.ic.wlgitbridge.git.util; + +import org.junit.Test; + +public class RepositoryObjectTreeWalkerTest { + + @Test + public void testGetDirectoryContents() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/util/UtilTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/util/UtilTest.java new file mode 100644 index 0000000000..08c0b97c52 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/util/UtilTest.java @@ -0,0 +1,26 @@ +package uk.ac.ic.wlgitbridge.util; + +import org.junit.Test; + +public class UtilTest { + + @Test + public void testEntries() throws Exception { + + } + + @Test + public void testBooleanToInt() throws Exception { + + } + + @Test + public void testIntToBoolean() throws Exception { + + } + + @Test + public void testRemoveAllSuffixes() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/ProjectLockTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/ProjectLockTest.java new file mode 100644 index 0000000000..ca76c3cbd8 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/ProjectLockTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class ProjectLockTest { + + @Test + public void testLockForProject() throws Exception { + + } + + @Test + public void testUnlockForProject() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/SnapshotFetcherTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/SnapshotFetcherTest.java new file mode 100644 index 0000000000..3bc7624559 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/SnapshotFetcherTest.java @@ -0,0 +1,33 @@ +package uk.ac.ic.wlgitbridge.writelatex; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class SnapshotFetcherTest { + + @Test + public void testFetchNewSnapshots() throws Exception { + + } + + @Test + public void testGetLatestSnapshot() throws Exception { + + } + + @Test + public void testPutLatestVersion() throws Exception { + + } + + @Test + public void testInitFromPersistentStore() throws Exception { + + } + + @Test + public void testGetVersions() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/SnapshotRepositoryBuilderTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/SnapshotRepositoryBuilderTest.java similarity index 78% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/SnapshotRepositoryBuilderTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/SnapshotRepositoryBuilderTest.java index 27f4d2db47..2bc5d799db 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/SnapshotRepositoryBuilderTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/SnapshotRepositoryBuilderTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 05/11/14. */ -public class SnapshotRepositoryBuilderTests { +public class SnapshotRepositoryBuilderTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/WLDirectoryNodeSnapshotTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/WLDirectoryNodeSnapshotTest.java new file mode 100644 index 0000000000..c358936a7b --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/WLDirectoryNodeSnapshotTest.java @@ -0,0 +1,38 @@ +package uk.ac.ic.wlgitbridge.writelatex; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class WLDirectoryNodeSnapshotTest { + + @Test + public void testGetJsonRepresentation() throws Exception { + + } + + @Test + public void testGetPreviousVersionID() throws Exception { + + } + + @Test + public void testGetProjectURL() throws Exception { + + } + + @Test + public void testApproveWithVersionID() throws Exception { + + } + + @Test + public void testGetProjectName() throws Exception { + + } + + @Test + public void testGetDirectoryNode() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/WriteLatexAPITest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/WriteLatexAPITest.java new file mode 100644 index 0000000000..940cb1a693 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/WriteLatexAPITest.java @@ -0,0 +1,41 @@ +package uk.ac.ic.wlgitbridge.writelatex; + +import org.junit.Test; + +public class WriteLatexAPITest { + + @Test + public void testLockForProject() throws Exception { + + } + + @Test + public void testUnlockForProject() throws Exception { + + } + + @Test + public void testRepositoryExists() throws Exception { + + } + + @Test + public void testGetWritableRepositories() throws Exception { + + } + + @Test + public void testPutDirectoryContentsToProjectWithName() throws Exception { + + } + + @Test + public void testPostbackReceivedSuccessfully() throws Exception { + + } + + @Test + public void testPostbackReceivedWithException() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/HTTPMethodTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/HTTPMethodTest.java new file mode 100644 index 0000000000..5480a58eec --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/HTTPMethodTest.java @@ -0,0 +1,12 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.base; + +import org.junit.Test; + +public class HTTPMethodTest { + + @Test + public void nothingToTest() { + + } + +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/RequestTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/RequestTest.java similarity index 97% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/RequestTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/RequestTest.java index c74165a3f1..fe7bc319aa 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/RequestTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/RequestTest.java @@ -8,7 +8,7 @@ import uk.ac.ic.wlgitbridge.writelatex.api.request.getsavedvers.SnapshotGetSaved /** * Created by Winston on 06/11/14. */ -public class RequestTests { +public class RequestTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/ResultTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/ResultTest.java new file mode 100644 index 0000000000..eb634ff5d4 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/ResultTest.java @@ -0,0 +1,17 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.base; + +import org.junit.Test; + +public class ResultTest { + + @Test + public void testGetRequest() throws Exception { + + } + + @Test + public void testToString() throws Exception { + + } + +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/SnapshotAPIRequestTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/SnapshotAPIRequestTest.java similarity index 82% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/SnapshotAPIRequestTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/SnapshotAPIRequestTest.java index e60a78bbbd..580c608f5c 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/SnapshotAPIRequestTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/base/SnapshotAPIRequestTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 06/11/14. */ -public class SnapshotAPIRequestTests { +public class SnapshotAPIRequestTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/exception/FailedConnectionExceptionTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/exception/FailedConnectionExceptionTest.java new file mode 100644 index 0000000000..270485aa21 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/exception/FailedConnectionExceptionTest.java @@ -0,0 +1,12 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.exception; + +import org.junit.Test; + +public class FailedConnectionExceptionTest { + + @Test + public void nothingToTest() { + + } + +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getdoc/SnapshotGetDocRequestTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getdoc/SnapshotGetDocRequestTest.java similarity index 81% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getdoc/SnapshotGetDocRequestTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getdoc/SnapshotGetDocRequestTest.java index 70775a1e85..ac32ed8066 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getdoc/SnapshotGetDocRequestTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getdoc/SnapshotGetDocRequestTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 06/11/14. */ -public class SnapshotGetDocRequestTests { +public class SnapshotGetDocRequestTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getdoc/SnapshotGetDocResultTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getdoc/SnapshotGetDocResultTest.java new file mode 100644 index 0000000000..c7995f42e6 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getdoc/SnapshotGetDocResultTest.java @@ -0,0 +1,16 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.getdoc; + +import org.junit.Test; + +public class SnapshotGetDocResultTest { + + @Test + public void testFromJSON() throws Exception { + + } + + @Test + public void testGetVersionID() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getdoc/exception/InvalidProjectExceptionTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getdoc/exception/InvalidProjectExceptionTest.java new file mode 100644 index 0000000000..39cc7cdfe9 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getdoc/exception/InvalidProjectExceptionTest.java @@ -0,0 +1,21 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.getdoc.exception; + +import org.junit.Test; + +public class InvalidProjectExceptionTest { + + @Test + public void testGetMessage() throws Exception { + + } + + @Test + public void testGetDescriptionLines() throws Exception { + + } + + @Test + public void testFromJSON() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotAttachmentTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotAttachmentTest.java new file mode 100644 index 0000000000..c3606f5c15 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotAttachmentTest.java @@ -0,0 +1,23 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.getforversion; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class SnapshotAttachmentTest { + + @Test + public void testGetContents() throws Exception { + + } + + @Test + public void testGetContentsFromJSON() throws Exception { + + } + + @Test + public void testGetUrl() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotDataTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotDataTest.java new file mode 100644 index 0000000000..f114ac840a --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotDataTest.java @@ -0,0 +1,23 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.getforversion; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class SnapshotDataTest { + + @Test + public void testFromJSON() throws Exception { + + } + + @Test + public void testGetSrcs() throws Exception { + + } + + @Test + public void testGetAtts() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotFileTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotFileTest.java new file mode 100644 index 0000000000..e6d5656740 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotFileTest.java @@ -0,0 +1,33 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.getforversion; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class SnapshotFileTest { + + @Test + public void testGetPath() throws Exception { + + } + + @Test + public void testGetContents() throws Exception { + + } + + @Test + public void testFromJSON() throws Exception { + + } + + @Test + public void testGetContentsFromJSON() throws Exception { + + } + + @Test + public void testGetPathFromJSON() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotGetForVersionRequestTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotGetForVersionRequestTest.java similarity index 90% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotGetForVersionRequestTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotGetForVersionRequestTest.java index 822ee62948..77403f1454 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotGetForVersionRequestTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotGetForVersionRequestTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 06/11/14. */ -public class SnapshotGetForVersionRequestTests { +public class SnapshotGetForVersionRequestTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotGetForVersionResultTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotGetForVersionResultTest.java new file mode 100644 index 0000000000..f1c5bc2b34 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getforversion/SnapshotGetForVersionResultTest.java @@ -0,0 +1,16 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.getforversion; + +import org.junit.Test; + +public class SnapshotGetForVersionResultTest { + + @Test + public void testFromJSON() throws Exception { + + } + + @Test + public void testGetSnapshotData() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/SnapshotGetSavedVersRequestTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/SnapshotGetSavedVersRequestTest.java similarity index 90% rename from services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/SnapshotGetSavedVersRequestTests.java rename to services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/SnapshotGetSavedVersRequestTest.java index 28d8761fd8..c797ffbb61 100644 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/SnapshotGetSavedVersRequestTests.java +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/SnapshotGetSavedVersRequestTest.java @@ -5,7 +5,7 @@ import org.junit.Test; /** * Created by Winston on 06/11/14. */ -public class SnapshotGetSavedVersRequestTests { +public class SnapshotGetSavedVersRequestTest { @Test public void nothingToTest() { diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/SnapshotGetSavedVersResultTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/SnapshotGetSavedVersResultTest.java new file mode 100644 index 0000000000..029da36044 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/SnapshotGetSavedVersResultTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.getsavedvers; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class SnapshotGetSavedVersResultTest { + + @Test + public void testFromJSON() throws Exception { + + } + + @Test + public void testGetSavedVers() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/SnapshotInfoTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/SnapshotInfoTest.java new file mode 100644 index 0000000000..0c283f830f --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/SnapshotInfoTest.java @@ -0,0 +1,28 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.getsavedvers; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class SnapshotInfoTest { + + @Test + public void testGetVersionId() throws Exception { + + } + + @Test + public void testGetComment() throws Exception { + + } + + @Test + public void testGetUser() throws Exception { + + } + + @Test + public void testGetCreatedAt() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/WLUserTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/WLUserTest.java new file mode 100644 index 0000000000..131393754d --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/getsavedvers/WLUserTest.java @@ -0,0 +1,16 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.getsavedvers; + +import org.junit.Test; + +public class WLUserTest { + + @Test + public void testGetName() throws Exception { + + } + + @Test + public void testGetEmail() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/PostbackContentsTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/PostbackContentsTest.java new file mode 100644 index 0000000000..06c094c642 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/PostbackContentsTest.java @@ -0,0 +1,21 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.push; + +import org.junit.Test; + +public class PostbackContentsTest { + + @Test + public void testWaitForPostback() throws Exception { + + } + + @Test + public void testReceivedVersionID() throws Exception { + + } + + @Test + public void testReceivedException() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/PostbackManagerTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/PostbackManagerTest.java new file mode 100644 index 0000000000..e4e6556b89 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/PostbackManagerTest.java @@ -0,0 +1,23 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.push; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class PostbackManagerTest { + + @Test + public void testGetVersionID() throws Exception { + + } + + @Test + public void testPostVersionIDForProject() throws Exception { + + } + + @Test + public void testPostExceptionForProject() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/SnapshotPushRequestResultTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/SnapshotPushRequestResultTest.java new file mode 100644 index 0000000000..47915dd2a9 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/SnapshotPushRequestResultTest.java @@ -0,0 +1,16 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.push; + +import org.junit.Test; + +public class SnapshotPushRequestResultTest { + + @Test + public void testWasSuccessful() throws Exception { + + } + + @Test + public void testFromJSON() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/SnapshotPushRequestTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/SnapshotPushRequestTest.java new file mode 100644 index 0000000000..3392d5c85a --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/SnapshotPushRequestTest.java @@ -0,0 +1,23 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.push; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class SnapshotPushRequestTest { + + @Test + public void testHttpMethod() throws Exception { + + } + + @Test + public void testGetPostBody() throws Exception { + + } + + @Test + public void testParseResponse() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/UnexpectedPostbackExceptionTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/UnexpectedPostbackExceptionTest.java new file mode 100644 index 0000000000..2af23f2f20 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/UnexpectedPostbackExceptionTest.java @@ -0,0 +1,12 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.push; + +import org.junit.Test; + +public class UnexpectedPostbackExceptionTest { + + @Test + public void nothingToTest() { + + } + +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/InvalidFilesExceptionTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/InvalidFilesExceptionTest.java new file mode 100644 index 0000000000..57d957fcfc --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/InvalidFilesExceptionTest.java @@ -0,0 +1,23 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.push.exception; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class InvalidFilesExceptionTest { + + @Test + public void testGetMessage() throws Exception { + + } + + @Test + public void testGetDescriptionLines() throws Exception { + + } + + @Test + public void testFromJSON() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/InvalidProjectExceptionTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/InvalidProjectExceptionTest.java new file mode 100644 index 0000000000..9e24e85461 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/InvalidProjectExceptionTest.java @@ -0,0 +1,23 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.push.exception; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class InvalidProjectExceptionTest { + + @Test + public void testGetMessage() throws Exception { + + } + + @Test + public void testGetDescriptionLines() throws Exception { + + } + + @Test + public void testFromJSON() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/OutOfDateExceptionTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/OutOfDateExceptionTest.java new file mode 100644 index 0000000000..806328f6fd --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/OutOfDateExceptionTest.java @@ -0,0 +1,23 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.push.exception; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class OutOfDateExceptionTest { + + @Test + public void testGetMessage() throws Exception { + + } + + @Test + public void testGetDescriptionLines() throws Exception { + + } + + @Test + public void testFromJSON() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/SnapshotPostExceptionBuilderTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/SnapshotPostExceptionBuilderTest.java new file mode 100644 index 0000000000..60884b6fe4 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/SnapshotPostExceptionBuilderTest.java @@ -0,0 +1,13 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.push.exception; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class SnapshotPostExceptionBuilderTest { + + @Test + public void testBuild() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/SnapshotPostExceptionTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/SnapshotPostExceptionTest.java new file mode 100644 index 0000000000..dc1bcfc2b6 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/SnapshotPostExceptionTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.push.exception; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class SnapshotPostExceptionTest { + + @Test + public void testGetMessage() throws Exception { + + } + + @Test + public void testGetDescriptionLines() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/UnexpectedErrorExceptionTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/UnexpectedErrorExceptionTest.java new file mode 100644 index 0000000000..88cf7ed13f --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/api/request/push/exception/UnexpectedErrorExceptionTest.java @@ -0,0 +1,21 @@ +package uk.ac.ic.wlgitbridge.writelatex.api.request.push.exception; + +import org.junit.Test; + +public class UnexpectedErrorExceptionTest { + + @Test + public void testGetMessage() throws Exception { + + } + + @Test + public void testGetDescriptionLines() throws Exception { + + } + + @Test + public void testFromJSON() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/BlobHashTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/BlobHashTest.java deleted file mode 100644 index a40cef8cd6..0000000000 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/BlobHashTest.java +++ /dev/null @@ -1,16 +0,0 @@ -package uk.ac.ic.wlgitbridge.writelatex.filestore; - -import org.junit.Test; -import uk.ac.ic.wlgitbridge.writelatex.filestore.store.BlobHash; - -public class BlobHashTest { - - private static final String toHash = "\\\\documentclass[a4paper]{article}\\n\\n\\\\usepackage[english]{babel}\\n\\\\usepackage[utf8]{inputenc}\\n\\\\usepackage{graphicx}\\n\\\\usepackage{fullpage}\\n\\\\usepackage{listings}\\n\\\\usepackage{courier}\\n\\\\usepackage{url}\\n\\n\\\\lstset{basicstyle=\\\\ttfamily,breaklines=true}\\n\\n\\\\begin{document}\\n\\\\title{API for the writeLaTeX-Git Bridge}\\n\\\\author{JLM}\\n\\\\date{\\\\today}\\n\\\\maketitle\\n\\n\\\\section{Fetching a Project from WriteLaTeX}\\n\\nThere are three API calls that will likely be of interest. You can run them against this server, \\\\url{radiant-wind-3058.herokuapp.com}, but they're not on the production server yet.\\n\\n\\\\subsection{Get Doc}\\n\\nA ``doc'' is our internal term for a ``project''. At present, this just returns the latest version number.\\n\\n\\\\begin{lstlisting}\\nGET https://.../api/v0/docs/1826rqgsdb\\n# => { latestVerId: 39 }\\n\\\\end{lstlisting}\\n\\n\\\\subsection{Get Saved Vers}\\n\\nA ``saved ver'' is a version of a doc, saved by via the versions menu. Note that this query is not currently paginated.\\n\\n\\\\begin{lstlisting}\\nGET https://.../api/v0/docs/1826rqgsdb/saved_vers\\n# => [\\n {\\\"versionId\\\":39,\\n \\\"comment\\\":\\\"with more files\\\",\\n \\\"user\\\":{\\n \\\"email\\\":\\\"jdleesmiller@gmail.com\\\",\\n \\\"name\\\":\\\"John Lees-Miller\\\"},\\n \\\"createdAt\\\":\\\"2014-11-05T18:02:19Z\\\"},\\n {\\\"versionId\\\":24,\\n \\\"comment\\\":\\\"first draft\\\",\\n \\\"user\\\":{\\n \\\"email\\\":\\\"jdleesmiller@gmail.com\\\",\\n \\\"name\\\":\\\"John Lees-Miller\\\"},\\n \\\"createdAt\\\":\\\"2014-11-05T17:56:58Z\\\"}]\\n\\\\end{lstlisting}\\n\\n\\\\subsection{Get Snapshot for Version}\\n\\nA snapshot contains the content of a project in the given version. You can safely request a snapshot of any version that is, or was at any point in the last 24 hours, (1) a saved version, or (2) the current version. (Older versions may or may not have been moved to cold storage.)\\n\\nThe srcs array contains (content, file name) pairs; the atts array contains (URL, file name) pairs.\\n\\n\\\\begin{lstlisting}\\nGET https://.../api/v0/docs/1826rqgsdb/snapshots/39\\n# => {\\n \\\"srcs\\\":[\\n [\\\"This text is from another file.\\\",\\\"foo/bar/test.tex\\\"],\\n [\\\"\\\\\\\\documentclass[a4paper]{article}\\\\n...\\\",\\\"main.tex\\\"]],\\n \\\"atts\\\":[\\n [\\\"https://writelatex-staging.s3.amazonaws.com/filepicker/1ENnu6zJSGyslI3DuNZD_min_mean_wait_evm_7.eps.150dpi.png\\\",\\\"min_mean_wait_evm_7_eps_150dpi.png\\\"]]}\\n\\\\end{lstlisting}\\n\\n\\\\section{Pushing a Project to WriteLaTeX}\\n\\nTODO still working on this part\\n\\n\\\\section{Test Data}\\n\\nYou can use this project as one of your test projects. I've added an attachment and a file in a subfolder to make it a bit more interesting.\\n\\n\\\\input{foo/bar/test}\\n\\n\\\\includegraphics[width=\\\\linewidth]{min_mean_wait_evm_7_eps_150dpi}\\n\\n\\\\end{document}"; - - @Test - public void hashesTheBytesGivenInTheConstructorUsingSha256() { - BlobHash blobHash = new BlobHash(toHash.getBytes()); - - } - -} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/GitDirectoryContentsTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/GitDirectoryContentsTest.java new file mode 100644 index 0000000000..4893c1538f --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/GitDirectoryContentsTest.java @@ -0,0 +1,28 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class GitDirectoryContentsTest { + + @Test + public void testWrite() throws Exception { + + } + + @Test + public void testGetUserName() throws Exception { + + } + + @Test + public void testGetUserEmail() throws Exception { + + } + + @Test + public void testGetCommitMessage() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/RepositoryFileTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/RepositoryFileTest.java new file mode 100644 index 0000000000..a5452a0f8e --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/RepositoryFileTest.java @@ -0,0 +1,16 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore; + +import org.junit.Test; + +public class RepositoryFileTest { + + @Test + public void testGetPath() throws Exception { + + } + + @Test + public void testGetContents() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/AttachmentBlobTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/AttachmentBlobTest.java new file mode 100644 index 0000000000..72ce3a64bb --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/AttachmentBlobTest.java @@ -0,0 +1,12 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore.blob; + +import org.junit.Test; + +public class AttachmentBlobTest { + + @Test + public void nothingToTest() { + + } + +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/BlobTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/BlobTest.java new file mode 100644 index 0000000000..d977233bb4 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/BlobTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore.blob; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class BlobTest { + + @Test + public void testGetContents() throws Exception { + + } + + @Test + public void testEquals() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/ByteBlobTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/ByteBlobTest.java new file mode 100644 index 0000000000..d2f8600f52 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/ByteBlobTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore.blob; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class ByteBlobTest { + + @Test + public void testGetContents() throws Exception { + + } + + @Test + public void testUpdatePersistentStore() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/ExternalBlobTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/ExternalBlobTest.java new file mode 100644 index 0000000000..3e60ec6b2b --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/ExternalBlobTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore.blob; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class ExternalBlobTest { + + @Test + public void testGetContents() throws Exception { + + } + + @Test + public void testUpdatePersistentStore() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/RawFileBlobTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/RawFileBlobTest.java new file mode 100644 index 0000000000..cde657adff --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/blob/RawFileBlobTest.java @@ -0,0 +1,12 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore.blob; + +import org.junit.Test; + +public class RawFileBlobTest { + + @Test + public void nothingToTest() { + + } + +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/node/AttachmentNodeTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/node/AttachmentNodeTest.java new file mode 100644 index 0000000000..6a375084f4 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/node/AttachmentNodeTest.java @@ -0,0 +1,33 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore.node; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class AttachmentNodeTest { + + @Test + public void testIndexWith() throws Exception { + + } + + @Test + public void testGetBlob() throws Exception { + + } + + @Test + public void testUpdatePersistentStore() throws Exception { + + } + + @Test + public void testGetURL() throws Exception { + + } + + @Test + public void testGetProjectName() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/node/BlobNodeTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/node/BlobNodeTest.java new file mode 100644 index 0000000000..b807519181 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/node/BlobNodeTest.java @@ -0,0 +1,23 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore.node; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class BlobNodeTest { + + @Test + public void testIndexWith() throws Exception { + + } + + @Test + public void testGetBlob() throws Exception { + + } + + @Test + public void testUpdatePersistentStore() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/node/FileNodeTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/node/FileNodeTest.java new file mode 100644 index 0000000000..f22506b95a --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/node/FileNodeTest.java @@ -0,0 +1,48 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore.node; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class FileNodeTest { + + @Test + public void testGetContents() throws Exception { + + } + + @Test + public void testWriteToDisk() throws Exception { + + } + + @Test + public void testGetFilePath() throws Exception { + + } + + @Test + public void testIsChanged() throws Exception { + + } + + @Test + public void testIndexWith() throws Exception { + + } + + @Test + public void testGetBlob() throws Exception { + + } + + @Test + public void testEquals() throws Exception { + + } + + @Test + public void testToString() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/node/WLDirectoryNodeTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/node/WLDirectoryNodeTest.java new file mode 100644 index 0000000000..e4b00c6d6a --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/node/WLDirectoryNodeTest.java @@ -0,0 +1,38 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore.node; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class WLDirectoryNodeTest { + + @Test + public void testInitFromPersistentStore() throws Exception { + + } + + @Test + public void testUpdatePersistentStore() throws Exception { + + } + + @Test + public void testGetFileNodes() throws Exception { + + } + + @Test + public void testUpdateFromSnapshot() throws Exception { + + } + + @Test + public void testCreateFromRawDirectoryContents() throws Exception { + + } + + @Test + public void testToString() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/store/BlobHashTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/store/BlobHashTest.java new file mode 100644 index 0000000000..e49fc14ac9 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/store/BlobHashTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore.store; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class BlobHashTest { + + @Test + public void testEquals() throws Exception { + + } + + @Test + public void testHashCode() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/store/FileIndexStoreTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/store/FileIndexStoreTest.java new file mode 100644 index 0000000000..2b3d17aa52 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/store/FileIndexStoreTest.java @@ -0,0 +1,38 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore.store; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class FileIndexStoreTest { + + @Test + public void testIndex() throws Exception { + + } + + @Test + public void testIndex1() throws Exception { + + } + + @Test + public void testInitFromPersistentStore() throws Exception { + + } + + @Test + public void testHasAttachmentWithURL() throws Exception { + + } + + @Test + public void testGetAttachment() throws Exception { + + } + + @Test + public void testUpdatePersistentStore() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/store/WLFileStoreTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/store/WLFileStoreTest.java new file mode 100644 index 0000000000..97fed9f67e --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/filestore/store/WLFileStoreTest.java @@ -0,0 +1,38 @@ +package uk.ac.ic.wlgitbridge.writelatex.filestore.store; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class WLFileStoreTest { + + @Test + public void testInitFromPersistentStore() throws Exception { + + } + + @Test + public void testDeleteInDirectory() throws Exception { + + } + + @Test + public void testDeleteInDirectoryApartFrom() throws Exception { + + } + + @Test + public void testUpdateForProject() throws Exception { + + } + + @Test + public void testCreateNextDirectoryNodeInProjectFromContents() throws Exception { + + } + + @Test + public void testApproveCandidateSnapshot() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/SnapshotTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/SnapshotTest.java new file mode 100644 index 0000000000..3254b86547 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/SnapshotTest.java @@ -0,0 +1,48 @@ +package uk.ac.ic.wlgitbridge.writelatex.model; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class SnapshotTest { + + @Test + public void testGetVersionID() throws Exception { + + } + + @Test + public void testGetComment() throws Exception { + + } + + @Test + public void testGetUserName() throws Exception { + + } + + @Test + public void testGetUserEmail() throws Exception { + + } + + @Test + public void testGetSrcs() throws Exception { + + } + + @Test + public void testGetAtts() throws Exception { + + } + + @Test + public void testCompareTo() throws Exception { + + } + + @Test + public void testToString() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/SnapshotTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/SnapshotTests.java deleted file mode 100644 index 1aa62b0be0..0000000000 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/SnapshotTests.java +++ /dev/null @@ -1,15 +0,0 @@ -package uk.ac.ic.wlgitbridge.writelatex.model; - -import org.junit.Test; - -/** - * Created by Winston on 05/11/14. - */ -public class SnapshotTests { - - @Test - public void nothingToTest() { - - } - -} diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLDataModelTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLDataModelTest.java new file mode 100644 index 0000000000..efb6bf759e --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLDataModelTest.java @@ -0,0 +1,28 @@ +package uk.ac.ic.wlgitbridge.writelatex.model; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class WLDataModelTest { + + @Test + public void testUpdateProjectWithName() throws Exception { + + } + + @Test + public void testGetProjectWithName() throws Exception { + + } + + @Test + public void testCreateCandidateSnapshotFromProjectWithContents() throws Exception { + + } + + @Test + public void testApproveSnapshot() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLDataModelTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLDataModelTests.java deleted file mode 100644 index e4aeaa1676..0000000000 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLDataModelTests.java +++ /dev/null @@ -1,15 +0,0 @@ -package uk.ac.ic.wlgitbridge.writelatex.model; - -import org.junit.Test; - -/** - * Created by Winston on 06/11/14. - */ -public class WLDataModelTests { - - @Test - public void nothingToTest() { - - } - -} diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLProjectStoreTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLProjectStoreTest.java new file mode 100644 index 0000000000..3aab7afa61 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLProjectStoreTest.java @@ -0,0 +1,21 @@ +package uk.ac.ic.wlgitbridge.writelatex.model; + +import org.junit.Test; + +public class WLProjectStoreTest { + + @Test + public void testGetProjectWithName() throws Exception { + + } + + @Test + public void testGetProjectNames() throws Exception { + + } + + @Test + public void testInitFromPersistentStore() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLProjectTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLProjectTest.java new file mode 100644 index 0000000000..3a99ebf7b8 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLProjectTest.java @@ -0,0 +1,33 @@ +package uk.ac.ic.wlgitbridge.writelatex.model; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class WLProjectTest { + + @Test + public void testFetchNewSnapshots() throws Exception { + + } + + @Test + public void testGetName() throws Exception { + + } + + @Test + public void testGetLatestSnapshotID() throws Exception { + + } + + @Test + public void testPutLatestSnapshot() throws Exception { + + } + + @Test + public void testInitFromPersistentStore() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLProjectTests.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLProjectTests.java deleted file mode 100644 index 724e645073..0000000000 --- a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/WLProjectTests.java +++ /dev/null @@ -1,15 +0,0 @@ -package uk.ac.ic.wlgitbridge.writelatex.model; - -import org.junit.Test; - -/** - * Created by Winston on 06/11/14. - */ -public class WLProjectTests { - - @Test - public void nothingToTest() { - - } - -} diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/WLGBPersistentStoreTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/WLGBPersistentStoreTest.java new file mode 100644 index 0000000000..3fe4046fbf --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/WLGBPersistentStoreTest.java @@ -0,0 +1,73 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class WLGBPersistentStoreTest { + + @Test + public void testLoadProjectStore() throws Exception { + + } + + @Test + public void testLoadFileStore() throws Exception { + + } + + @Test + public void testAddProject() throws Exception { + + } + + @Test + public void testAddSnapshot() throws Exception { + + } + + @Test + public void testAddFileNodeBlob() throws Exception { + + } + + @Test + public void testAddFileNodeExternal() throws Exception { + + } + + @Test + public void testAddURLIndex() throws Exception { + + } + + @Test + public void testGetProjectNames() throws Exception { + + } + + @Test + public void testGetVersionIDsForProjectName() throws Exception { + + } + + @Test + public void testGetFileNodesForProjectName() throws Exception { + + } + + @Test + public void testGetURLIndexTableForProjectName() throws Exception { + + } + + @Test + public void testDeleteFileNodesForProjectName() throws Exception { + + } + + @Test + public void testDeleteURLIndexesForProjectName() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/SQLiteWLDatabaseTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/SQLiteWLDatabaseTest.java new file mode 100644 index 0000000000..69181d02f2 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/SQLiteWLDatabaseTest.java @@ -0,0 +1,61 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql; + +import org.junit.Test; + +public class SQLiteWLDatabaseTest { + + @Test + public void testAddProject() throws Exception { + + } + + @Test + public void testAddSnapshot() throws Exception { + + } + + @Test + public void testAddFileNodeBlob() throws Exception { + + } + + @Test + public void testAddFileNodeExternal() throws Exception { + + } + + @Test + public void testAddURLIndex() throws Exception { + + } + + @Test + public void testGetProjectNames() throws Exception { + + } + + @Test + public void testGetVersionIDsForProjectName() throws Exception { + + } + + @Test + public void testGetFileNodesForProjectName() throws Exception { + + } + + @Test + public void testGetURLIndexTableForProjectName() throws Exception { + + } + + @Test + public void testDeleteFileNodesForProjectName() throws Exception { + + } + + @Test + public void testDeleteURLIndexesForProjectName() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/query/GetFileNodesForProjectNameSQLQueryTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/query/GetFileNodesForProjectNameSQLQueryTest.java new file mode 100644 index 0000000000..9dca3ff7de --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/query/GetFileNodesForProjectNameSQLQueryTest.java @@ -0,0 +1,23 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.query; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class GetFileNodesForProjectNameSQLQueryTest { + + @Test + public void testProcessResultSet() throws Exception { + + } + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/query/GetProjectNamesSQLQueryTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/query/GetProjectNamesSQLQueryTest.java new file mode 100644 index 0000000000..c64f563492 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/query/GetProjectNamesSQLQueryTest.java @@ -0,0 +1,23 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.query; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class GetProjectNamesSQLQueryTest { + + @Test + public void testProcessResultSet() throws Exception { + + } + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/query/GetURLIndexTableForProjectNameSQLQueryTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/query/GetURLIndexTableForProjectNameSQLQueryTest.java new file mode 100644 index 0000000000..cba820e8d6 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/query/GetURLIndexTableForProjectNameSQLQueryTest.java @@ -0,0 +1,23 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.query; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class GetURLIndexTableForProjectNameSQLQueryTest { + + @Test + public void testProcessResultSet() throws Exception { + + } + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/query/GetVersionIDsForProjectNameSQLQueryTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/query/GetVersionIDsForProjectNameSQLQueryTest.java new file mode 100644 index 0000000000..0a42fe9af0 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/query/GetVersionIDsForProjectNameSQLQueryTest.java @@ -0,0 +1,23 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.query; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class GetVersionIDsForProjectNameSQLQueryTest { + + @Test + public void testProcessResultSet() throws Exception { + + } + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/create/CreateFileNodeTableSQLUpdateTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/create/CreateFileNodeTableSQLUpdateTest.java new file mode 100644 index 0000000000..693fa0094c --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/create/CreateFileNodeTableSQLUpdateTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.update.create; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class CreateFileNodeTableSQLUpdateTest { + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/create/CreateProjectsTableSQLUpdateTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/create/CreateProjectsTableSQLUpdateTest.java new file mode 100644 index 0000000000..fe69d554dc --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/create/CreateProjectsTableSQLUpdateTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.update.create; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class CreateProjectsTableSQLUpdateTest { + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/create/CreateSnapshotsTableSQLUpdateTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/create/CreateSnapshotsTableSQLUpdateTest.java new file mode 100644 index 0000000000..f20030e45b --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/create/CreateSnapshotsTableSQLUpdateTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.update.create; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class CreateSnapshotsTableSQLUpdateTest { + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/create/CreateURLIndexStoreSQLUpdateTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/create/CreateURLIndexStoreSQLUpdateTest.java new file mode 100644 index 0000000000..0dc9c30e83 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/create/CreateURLIndexStoreSQLUpdateTest.java @@ -0,0 +1,16 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.update.create; + +import org.junit.Test; + +public class CreateURLIndexStoreSQLUpdateTest { + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/delete/DeleteFileNodesForProjectNameSQLUpdateTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/delete/DeleteFileNodesForProjectNameSQLUpdateTest.java new file mode 100644 index 0000000000..3a779ac901 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/delete/DeleteFileNodesForProjectNameSQLUpdateTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.update.delete; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class DeleteFileNodesForProjectNameSQLUpdateTest { + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/delete/DeleteURLIndexesForProjectNameSQLUpdateTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/delete/DeleteURLIndexesForProjectNameSQLUpdateTest.java new file mode 100644 index 0000000000..8f8a2a3057 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/delete/DeleteURLIndexesForProjectNameSQLUpdateTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.update.delete; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class DeleteURLIndexesForProjectNameSQLUpdateTest { + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddFileNodeBlobSQLUpdateTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddFileNodeBlobSQLUpdateTest.java new file mode 100644 index 0000000000..c0fd5d8ec3 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddFileNodeBlobSQLUpdateTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.update.insert; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class AddFileNodeBlobSQLUpdateTest { + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddFileNodeExternalSQLUpdateTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddFileNodeExternalSQLUpdateTest.java new file mode 100644 index 0000000000..a7056f67e8 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddFileNodeExternalSQLUpdateTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.update.insert; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class AddFileNodeExternalSQLUpdateTest { + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddProjectSQLUpdateTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddProjectSQLUpdateTest.java new file mode 100644 index 0000000000..5804cf408f --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddProjectSQLUpdateTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.update.insert; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class AddProjectSQLUpdateTest { + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddSnapshotSQLUpdateTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddSnapshotSQLUpdateTest.java new file mode 100644 index 0000000000..ed8291b010 --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddSnapshotSQLUpdateTest.java @@ -0,0 +1,18 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.update.insert; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class AddSnapshotSQLUpdateTest { + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file diff --git a/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddURLIndexSQLUpdateTest.java b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddURLIndexSQLUpdateTest.java new file mode 100644 index 0000000000..d554dc8e6e --- /dev/null +++ b/services/git-bridge/test/uk/ac/ic/wlgitbridge/writelatex/model/db/sql/update/insert/AddURLIndexSQLUpdateTest.java @@ -0,0 +1,16 @@ +package uk.ac.ic.wlgitbridge.writelatex.model.db.sql.update.insert; + +import org.junit.Test; + +public class AddURLIndexSQLUpdateTest { + + @Test + public void testGetSQL() throws Exception { + + } + + @Test + public void testAddParametersToStatement() throws Exception { + + } +} \ No newline at end of file