| | |
| | | TestCaseUtils.initializeTestBackend(true); |
| | | TestCaseUtils.addEntries(LDIF_LINES); |
| | | |
| | | VirtualAttributeRule rule = null; |
| | | for (VirtualAttributeRule r : DirectoryServer.getVirtualAttributes()) |
| | | { |
| | | if (r.getAttributeType().equals(memberType)) |
| | | { |
| | | rule = r; |
| | | break; |
| | | } |
| | | } |
| | | VirtualAttributeRule rule = getRule(); |
| | | assertNotNull(rule); |
| | | |
| | | MemberVirtualAttributeProvider provider = |
| | |
| | | assertFalse(provider.isSearchable(rule, searchOperation, true)); |
| | | |
| | | provider.processSearch(rule, searchOperation); |
| | | assertFalse(searchOperation.getResultCode() == ResultCode.SUCCESS); |
| | | assertNotSame(searchOperation.getResultCode(), ResultCode.SUCCESS); |
| | | |
| | | cleanUp(); |
| | | } |
| | |
| | | TestCaseUtils.initializeTestBackend(true); |
| | | TestCaseUtils.addEntries(LDIF_LINES); |
| | | |
| | | VirtualAttributeRule rule = null; |
| | | for (VirtualAttributeRule r : DirectoryServer.getVirtualAttributes()) |
| | | { |
| | | if (r.getAttributeType().equals(memberType)) |
| | | { |
| | | rule = r; |
| | | break; |
| | | } |
| | | } |
| | | VirtualAttributeRule rule = getRule(); |
| | | assertNotNull(rule); |
| | | |
| | | MemberVirtualAttributeProvider provider = |
| | |
| | | assertFalse(provider.isSearchable(rule, searchOperation, false)); |
| | | |
| | | provider.processSearch(rule, searchOperation); |
| | | assertFalse(searchOperation.getResultCode() == ResultCode.SUCCESS); |
| | | assertNotSame(searchOperation.getResultCode(), ResultCode.SUCCESS); |
| | | |
| | | cleanUp(); |
| | | } |
| | | |
| | | |
| | | private VirtualAttributeRule getRule() |
| | | { |
| | | for (VirtualAttributeRule r : DirectoryServer.getVirtualAttributes()) |
| | | { |
| | | if (r.getAttributeType().equals(memberType)) |
| | | { |
| | | return r; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * Tests the behavior of the member virtual attribute with a dynamic group. |