diff --git a/services/git-bridge/src/test/java/uk/ac/ic/wlgitbridge/bridge/repo/FSGitRepoStoreTest.java b/services/git-bridge/src/test/java/uk/ac/ic/wlgitbridge/bridge/repo/FSGitRepoStoreTest.java index 8d03201516..d83dfe6637 100644 --- a/services/git-bridge/src/test/java/uk/ac/ic/wlgitbridge/bridge/repo/FSGitRepoStoreTest.java +++ b/services/git-bridge/src/test/java/uk/ac/ic/wlgitbridge/bridge/repo/FSGitRepoStoreTest.java @@ -77,18 +77,14 @@ public class FSGitRepoStoreTest { @Test public void zipAndUnzipShouldBeTheSame() throws IOException { - long beforeSize = repoStore.totalSize(); + File expected = new File(original, "proj1"); + File actual = new File(repoStore.getRootDirectory(), "proj1"); + assertTrue(Files.contentsAreEqual(expected, actual)); InputStream zipped = repoStore.bzip2Project("proj1"); repoStore.remove("proj1"); - assertTrue(beforeSize > repoStore.totalSize()); + assertFalse(actual.exists()); repoStore.unbzip2Project("proj1", zipped); - assertEquals(beforeSize, repoStore.totalSize()); - assertTrue( - Files.contentsAreEqual( - original, - repoStore.getRootDirectory() - ) - ); + assertTrue(Files.contentsAreEqual(expected, actual)); } } \ No newline at end of file