Search in sources :

Example 1 with DirectoryFileObjectResolver

use of com.evolveum.midpoint.test.util.DirectoryFileObjectResolver in project midpoint by Evolveum.

the class MappingTestEvaluator method init.

public void init() throws SchemaException, SAXException, IOException {
    PrettyPrinter.setDefaultNamespacePrefix(MidPointConstants.NS_MIDPOINT_PUBLIC_PREFIX);
    PrismTestUtil.resetPrismContext(MidPointPrismContextFactory.FACTORY);
    prismContext = PrismTestUtil.createInitializedPrismContext();
    ObjectResolver resolver = new DirectoryFileObjectResolver(MidPointTestConstants.OBJECTS_DIR);
    protector = ExpressionTestUtil.createInitializedProtector(prismContext);
    ExpressionFactory expressionFactory = ExpressionTestUtil.createInitializedExpressionFactory(resolver, protector, prismContext, null);
    mappingFactory = new MappingFactory();
    mappingFactory.setExpressionFactory(expressionFactory);
    mappingFactory.setObjectResolver(resolver);
    mappingFactory.setPrismContext(prismContext);
    mappingFactory.setProfiling(true);
    mappingFactory.setProtector(protector);
}
Also used : ExpressionFactory(com.evolveum.midpoint.repo.common.expression.ExpressionFactory) ObjectResolver(com.evolveum.midpoint.schema.util.ObjectResolver) DirectoryFileObjectResolver(com.evolveum.midpoint.test.util.DirectoryFileObjectResolver) DirectoryFileObjectResolver(com.evolveum.midpoint.test.util.DirectoryFileObjectResolver)

Aggregations

ExpressionFactory (com.evolveum.midpoint.repo.common.expression.ExpressionFactory)1 ObjectResolver (com.evolveum.midpoint.schema.util.ObjectResolver)1 DirectoryFileObjectResolver (com.evolveum.midpoint.test.util.DirectoryFileObjectResolver)1