@Test public void test510Search() throws Exception { final String TEST_NAME = "test510Search"; TestUtil.displayTestTile(this, TEST_NAME); // GIVEN ObjectClassComplexTypeDefinition accountDefinition = resourceSchema.findObjectClassDefinition( ProvisioningTestUtil.OBJECT_CLASS_INETORGPERSON_NAME); // Determine object class from the schema ResultHandler<ShadowType> handler = new ResultHandler<ShadowType>() { @Override public boolean handle(PrismObject<ShadowType> object) { System.out.println("Search: found: " + object); return true; } }; OperationResult result = new OperationResult(this.getClass().getName() + "." + TEST_NAME); // WHEN cc.search(accountDefinition, new ObjectQuery(), handler, null, null, null, result); // THEN }
@Test public void testSearch() throws UcfException, SchemaException, CommunicationException { TestUtil.displayTestTile("testSearch"); // GIVEN ObjectClassComplexTypeDefinition accountDefinition = resourceSchema.findDefaultObjectClassDefinition(ShadowKindType.ACCOUNT); // Determine object class from the schema ResultHandler<ShadowType> handler = new ResultHandler<ShadowType>() { @Override public boolean handle(PrismObject<ShadowType> object) { System.out.println("Search: found: " + object); return true; } }; OperationResult result = new OperationResult(this.getClass().getName() + ".testSearch"); // WHEN cc.search(accountDefinition, new ObjectQuery(), handler, null, result); // THEN }