Skip to content

Commit

Permalink
paths tests; paths are relative to the root node, not absolute paths.…
Browse files Browse the repository at this point in the history
…. we'll see if that's a good idea
  • Loading branch information
cbeer committed Feb 12, 2013
1 parent 2ad6e52 commit a4328c5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Expand Up @@ -11,7 +11,7 @@ public class PathService {


public String getObjectJcrNodePath(String pid) {
return "/objects/" + pid;
return "objects/" + pid;
}

public String getDatastreamJcrNodePath(String pid, String dsid) {
Expand Down
@@ -0,0 +1,17 @@
package org.fcrepo.services;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class PathServiceTest {
@Test
public void testGetObjectJcrNodePath() throws Exception {
assertEquals("objects/test:123", new PathService().getObjectJcrNodePath("test:123"));
}

@Test
public void testGetDatastreamJcrNodePath() throws Exception {
assertEquals("objects/test:123/asdf", new PathService().getDatastreamJcrNodePath("test:123", "asdf"));
}
}

0 comments on commit a4328c5

Please sign in to comment.