Dummy resource is a simple Java object that simulates real resource. There is also a ConnId connector for that. The dummy resource is fully embedded and it is using only local Java interfaces. It is designed for the sole purpose of being used in the tests.
The resource can be configured for variety of configurations: it can support activation or not to support it, it can be case sensitive or case ignore, it can use persistent identifiers or just usernames and so on. It can also simulate various errors. Therefore it is much easier and much more flexible to use the dummy resource in tests than a real resource.
|Dummy Resource||icf-connectors/dummy-resource||The resource itself. This is pure Java code that is entirely independent (not dependent on ConnId). This can be set up or inspected directly in the test, so end-to-end test cases are possible.|
|Dummy Connector||icf-connectors/dummy-connector||ConnId connector for dummy resource.|
|Fake Dummy Connector||icf-connectors/dummy-connector-fake||ConnId connector that presents itself in almost the same way as the dummy connector. It just has different version number. And it does not really works. This is used for some border-case testing scenarios.|
Controlling the Resource in Tests
There is a
DummyResourceController class that can be used to conveniently control dummy resources. There is no need to start the dummy resources and the dummy resource instances are created automatically when they are first used. But the
DummyResourceController can be used to initialize resource schema, to get resource namespaces and attribute QNames and so on. This is a very convenient class.