Examples of CmisTestResult


Examples of org.apache.chemistry.opencmis.tck.CmisTestResult

    public abstract void run(Session session) throws Exception;

    protected RepositoryInfo getRepositoryInfo(Session session) {
        RepositoryInfo ri = session.getRepositoryInfo();

        CmisTestResult failure = createResult(FAILURE, "Repository info is null!", true);
        addResult(assertNotNull(ri, null, failure));

        return ri;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.tck.CmisTestResult

            addResult(checkObject(session, result, propertiesToCheck, "New folder object spec compliance"));

            // check object parents
            List<Folder> objectParents = result.getParents();

            CmisTestResult f = createResult(FAILURE, "Newly created folder has no or more than one parent! Id: "
                    + result.getId(), true);
            addResult(assertEquals(1, objectParents.size(), null, f));

            f = createResult(FAILURE, "First object parent of the newly created folder does not match parent! Id: "
                    + result.getId(), true);
View Full Code Here

Examples of org.apache.chemistry.opencmis.tck.CmisTestResult

                    addResult(createResult(UNEXPECTED_EXCEPTION,
                            "Object could not be deleted! Exception: " + e.getMessage(), e, true));
                }
            }

            CmisTestResult f = createResult(FAILURE, "Object should not exist anymore but it is still there! Id: "
                    + object.getId(), true);
            addResult(assertIsFalse(exists(object), null, f));
        }
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.tck.CmisTestResult

    }

    protected CmisTestResult checkObject(Session session, CmisObject object, String[] properties, String message) {
        List<CmisTestResult> results = new ArrayList<CmisTestResult>();

        CmisTestResult f;

        f = createResult(FAILURE, "Object is null!", true);
        addResult(results, assertNotNull(object, null, f));

        if (object != null) {
View Full Code Here

Examples of org.apache.chemistry.opencmis.tck.CmisTestResult

    }

    protected CmisTestResult checkACL(Session session, Acl acl, String message) {
        List<CmisTestResult> results = new ArrayList<CmisTestResult>();

        CmisTestResult f;

        f = createResult(FAILURE, "ACL is null!");
        addResult(results, assertNotNull(acl, null, f));

        if (acl != null) {
View Full Code Here

Examples of org.apache.chemistry.opencmis.tck.CmisTestResult

        if (!(object instanceof Document)) {
            // only documents have content
            return;
        }

        CmisTestResult f;

        Document doc = (Document) object;
        DocumentTypeDefinition type = (DocumentTypeDefinition) doc.getType();

        // check ContentStreamAllowed flag
View Full Code Here

Examples of org.apache.chemistry.opencmis.tck.CmisTestResult

                    setIcon(GROUP_ICON);
                } else if (node.getUserObject() instanceof CmisTest) {
                    setText(((CmisTest) node.getUserObject()).getName());
                    setIcon(TEST_ICON);
                } else if (node.getUserObject() instanceof CmisTestResult) {
                    CmisTestResult result = (CmisTestResult) node.getUserObject();

                    String text = "<html><b>" + result.getStatus() + ": " + result.getMessage() + "</b>";
                    if ((result.getStackTrace() != null) && (result.getStackTrace().length > 0)) {
                        text += " (" + result.getStackTrace()[0].getFileName() + ":"
                                + result.getStackTrace()[0].getLineNumber() + ")";
                    }
                    setText(text);

                    switch (result.getStatus()) {
                    case OK:
                        setIcon(STATUS_OK_ICON);
                        break;
                    case WARNING:
                        setIcon(STATUS_WARNING_ICON);
View Full Code Here

Examples of org.apache.chemistry.opencmis.tck.CmisTestResult

    }

    protected CmisTestResult checkRenditions(Session session, CmisObject object, String message) {
        List<CmisTestResult> results = new ArrayList<CmisTestResult>();

        CmisTestResult f;

        if (object.getRenditions() != null) {

            for (Rendition rend : object.getRenditions()) {
                f = createResult(FAILURE, "A rendition in the list of renditions is null!");
View Full Code Here

Examples of org.apache.chemistry.opencmis.tck.CmisTestResult

    }

    protected CmisTestResult checkVersionHistory(Session session, CmisObject object, String[] properties, String message) {
        List<CmisTestResult> results = new ArrayList<CmisTestResult>();

        CmisTestResult f;

        if (object.getBaseTypeId() != BaseTypeId.CMIS_DOCUMENT) {
            // skip non-document objects
            return null;
        }
View Full Code Here

Examples of org.apache.chemistry.opencmis.tck.CmisTestResult

    }

    protected CmisTestResult checkProperty(Property<?> property, String message, PropertyCheckEnum propertyCheck) {
        List<CmisTestResult> results = new ArrayList<CmisTestResult>();

        CmisTestResult f;

        f = createResult(FAILURE, "Property is not included in response!");
        addResult(results, assertNotNull(property, null, f));

        if (property != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.