workspaceInfo.setUserId(userInfo.getUniqueId());
metaStore.createWorkspace(workspaceInfo);
// create the project
String projectName = "Orion Project";
ProjectInfo projectInfo = new ProjectInfo();
projectInfo.setFullName(projectName);
try {
projectInfo.setContentLocation(new URI("file:/home/anthony/orion/project"));
} catch (URISyntaxException e) {
// should not get an exception here, simple URI
}
projectInfo.setWorkspaceId(workspaceInfo.getUniqueId());
metaStore.createProject(projectInfo);
// update the project
URI newURI = new URI("file:/workspace/foo");
projectInfo.setContentLocation(newURI);
projectInfo.setProperty("New", "Property");
// update the project
metaStore.updateProject(projectInfo);
// read the project back again
ProjectInfo readProjectInfo = metaStore.readProject(workspaceInfo.getUniqueId(), projectInfo.getFullName());
assertNotNull(readProjectInfo);
assertTrue(readProjectInfo.getContentLocation().equals(newURI));
assertEquals(readProjectInfo.getProperty("New"), "Property");
}