|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
org.identityconnectors.test.common.TestHelpers
public final class TestHelpers
Bag of utility methods useful to connector tests.
Method Summary | |
---|---|
static ConnectorMessages |
createDummyMessages() Creates an dummy message catalog ideal for unit testing. |
static APIConfiguration |
createTestConfiguration(java.lang.Class<? extends Connector> clazz, Configuration config) Method for convenient testing of local connectors. |
static void |
fillConfiguration(Configuration config, java.util.Map<java.lang.String,? extends java.lang.Object> configData) Fills a configuration bean with data from the given map. |
static PropertyBag |
getProperties(java.lang.Class<?> clazz) Loads Property bag for the specified class. |
static void |
search(SearchOp<?> search, ObjectClass oclass, Filter filter, ResultsHandler handler, OperationOptions options) Performs a raw, unfiltered search at the SPI level, eliminating duplicates from the result set. |
static java.util.List<ConnectorObject> |
searchToList(SearchApiOp search, ObjectClass oclass, Filter filter) |
static java.util.List<ConnectorObject> |
searchToList(SearchApiOp search, ObjectClass oclass, Filter filter, OperationOptions options) |
static java.util.List<ConnectorObject> |
searchToList(SearchOp<?> search, ObjectClass oclass, Filter filter) Performs a raw, unfiltered search at the SPI level, eliminating duplicates from the result set. |
static java.util.List<ConnectorObject> |
searchToList(SearchOp<?> search, ObjectClass oclass, Filter filter, OperationOptions options) Performs a raw, unfiltered search at the SPI level, eliminating duplicates from the result set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static APIConfiguration createTestConfiguration(java.lang.Class<? extends Connector> clazz, Configuration config)
public static void fillConfiguration(Configuration config, java.util.Map<java.lang.String,? extends java.lang.Object> configData)
config
- the configuration bean.configData
- the map with configuration data.public static ConnectorMessages createDummyMessages()
message-key: arg0.toString(), ..., argn.toString
public static java.util.List<ConnectorObject> searchToList(SearchApiOp search, ObjectClass oclass, Filter filter)
public static java.util.List<ConnectorObject> searchToList(SearchApiOp search, ObjectClass oclass, Filter filter, OperationOptions options)
public static java.util.List<ConnectorObject> searchToList(SearchOp<?> search, ObjectClass oclass, Filter filter)
search
- The search SPIoclass
- The object class - passed through to connector so it may be null if the connecor allowing it to be null. (This is convenient for unit tests, but will not be the case in general)filter
- The filter to search onpublic static java.util.List<ConnectorObject> searchToList(SearchOp<?> search, ObjectClass oclass, Filter filter, OperationOptions options)
search
- The search SPIoclass
- The object class - passed through to connector so it may be null if the connecor allowing it to be null. (This is convenient for unit tests, but will not be the case in general)filter
- The filter to search onoptions
- The options - may be null - will be cast to an empty OperationOptionspublic static void search(SearchOp<?> search, ObjectClass oclass, Filter filter, ResultsHandler handler, OperationOptions options)
search
- The search SPIoclass
- The object class - passed through to connector so it may be null if the connecor allowing it to be null. (This is convenient for unit tests, but will not be the case in general)filter
- The filter to search onhandler
- The result handleroptions
- The options - may be null - will be cast to an empty OperationOptionspublic static PropertyBag getProperties(java.lang.Class<?> clazz)
loader.getResource(prefix + "/config/config.groovy")
loader.getResource(prefix + "/config/" + cfg + "/config.groovy")
optionally where cfg is passed configurationloader.getResource(prefix + "/config-private/config.groovy") </
loader.getResource(prefix + "/config-private/" + cfg + "/config.groovy")
optionally where cfg is passed configurationclazz
- Class which FQN is used as root prefix for loading of propertiesjava.lang.IllegalStateException
- if context classloader is null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |