Skip to content
Snippets Groups Projects
Commit 86b9abc7 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- fixed tc

parent c3381398
No related branches found
No related tags found
No related merge requests found
Pipeline #3837 passed
...@@ -37,10 +37,12 @@ import static org.junit.Assert.assertTrue; ...@@ -37,10 +37,12 @@ import static org.junit.Assert.assertTrue;
public class TestSLUBStoragePlugin { public class TestSLUBStoragePlugin {
private static SLUBStoragePlugin mock; private static SLUBStoragePlugin mock;
private static Path testroot; private static Path testroot;
private static Path foopath;
@Before @Before
public void setUp() throws IOException { public void setUp() throws IOException {
testroot = Files.createTempDirectory("testslubstorage"); testroot = Files.createTempDirectory("testslubstorage");
Files.createFile(of(testroot.toAbsolutePath() + "/foo")); foopath = of(testroot.toAbsolutePath() + "/foo");
Files.createFile(foopath);
mock = new SLUBStoragePlugin(); mock = new SLUBStoragePlugin();
HashMap<String, String> map = new HashMap<String,String> (); HashMap<String, String> map = new HashMap<String,String> ();
map.put("DIR_ROOT", testroot.toAbsolutePath().toString()); map.put("DIR_ROOT", testroot.toAbsolutePath().toString());
...@@ -64,8 +66,8 @@ public class TestSLUBStoragePlugin { ...@@ -64,8 +66,8 @@ public class TestSLUBStoragePlugin {
public void checkFixity() { public void checkFixity() {
List<Fixity> fixities = new ArrayList<>(); List<Fixity> fixities = new ArrayList<>();
try { try {
var result = mock.checkFixity(fixities, "/tmp/foo"); var result = mock.checkFixity(fixities, foopath.toString());
assertTrue("checkFixity", result); assertTrue("checkFixity(.., "+foopath.toString()+")", result);
} }
catch (Exception e) { catch (Exception e) {
assertEquals("checkFixity", "foo", e.getMessage()); assertEquals("checkFixity", "foo", e.getMessage());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment