private void testTrailingSpace(Session session, Folder testFolder) { String name = "trailing.txt"; try { Document doc = createDocumentWithoutChecks(testFolder, name + " "); if (doc.getName().equals(name + " ")) { addResult(createInfoResult("Repository does supports document names with a trailing space.")); } else { if (doc.getName().equals(name)) { addResult(createInfoResult("Repository removes trailing space from document name.")); } else { addResult(createInfoResult("Repository renames documents with a trailing space.")); } } } catch (CmisBaseException e) { addResult(createInfoResult("Repository does not support document names with a trailing space. Exception: " + e.toString())); } }
private void testLeadingSpace(Session session, Folder testFolder) { String name = "leading.txt"; try { Document doc = createDocumentWithoutChecks(testFolder, " " + name); if (doc.getName().equals(" " + name)) { addResult(createInfoResult("Repository does supports document names with a leading space.")); } else { if (doc.getName().equals(name)) { addResult(createInfoResult("Repository removes leading space from document name.")); } else { addResult(createInfoResult("Repository renames documents with a leading space.")); } } } catch (CmisBaseException e) { addResult(createInfoResult("Repository does not support document names with a leading space. Exception: " + e.toString())); } }
private void testCenterSpaceSpace(Session session, Folder testFolder) { String name = "center space.txt"; try { Document doc = createDocumentWithoutChecks(testFolder, name); if (doc.getName().equals(name)) { addResult(createInfoResult("Repository does supports document names with a space.")); } else { if (doc.getName().equals("centerspace.txt")) { addResult(createInfoResult("Repository removes spaces from document name.")); } else { addResult(createInfoResult("Repository renames documents with a space.")); } } } catch (CmisBaseException e) { addResult(createInfoResult("Repository does not support document names with a space. Exception: " + e.toString())); } }
private void testMultipleCenterSpaceSpace(Session session, Folder testFolder) { String name = "twocenter spaces.txt"; try { Document doc = createDocumentWithoutChecks(testFolder, name); if (doc.getName().equals(name)) { addResult(createInfoResult("Repository does supports document names with more than one successive spaces.")); } else { if (doc.getName().equals("twocenterspaces.txt")) { addResult(createInfoResult("Repository removes spaces from document name.")); } else if (doc.getName().equals("twocenter spaces.txt")) { addResult(createInfoResult("Repository combines multiple spaces into one in document names.")); } else { addResult(createInfoResult("Repository renames documents with a space.")); } } } catch (CmisBaseException e) { addResult(createInfoResult("Repository does not support document names with a space. Exception: " + e.toString())); } }
throw new CmisRuntimeException("Could not determine the name of the PWC: " + e.toString(), e);