Search in sources :

Example 1 with WrapperCmisTestGroup

use of org.apache.chemistry.opencmis.tck.impl.WrapperCmisTestGroup in project copper-cms by PogeyanOSS.

the class AbstractRunner method addGroup.

public void addGroup(String groupClass) throws Exception {
    if (groupClass == null) {
        return;
    }
    groupClass = groupClass.trim();
    if (groupClass.length() == 0) {
        return;
    }
    Class<?> clazz = ClassLoaderUtil.loadClass(groupClass);
    Object o = clazz.newInstance();
    CmisTestGroup group = null;
    if (o instanceof CmisTestGroup) {
        group = (CmisTestGroup) o;
    } else if (o instanceof CmisTest) {
        group = new WrapperCmisTestGroup((CmisTest) o);
    } else {
        throw new InstantiationException("Not a CmisTestGroup or CmisTest class!");
    }
    addGroup(group);
}
Also used : CmisTestGroup(org.apache.chemistry.opencmis.tck.CmisTestGroup) WrapperCmisTestGroup(org.apache.chemistry.opencmis.tck.impl.WrapperCmisTestGroup) WrapperCmisTestGroup(org.apache.chemistry.opencmis.tck.impl.WrapperCmisTestGroup) CmisTest(org.apache.chemistry.opencmis.tck.CmisTest)

Aggregations

CmisTest (org.apache.chemistry.opencmis.tck.CmisTest)1 CmisTestGroup (org.apache.chemistry.opencmis.tck.CmisTestGroup)1 WrapperCmisTestGroup (org.apache.chemistry.opencmis.tck.impl.WrapperCmisTestGroup)1