@Test public void testRecordOperation() { RenameOperationRecorder tested = new RenameOperationRecorder( ldapOperationsMock); CompensatingTransactionOperationExecutor operation = tested .recordOperation(new Object[] { "ou=someou", "ou=newou" }); assertThat(operation instanceof RenameOperationExecutor).isTrue(); RenameOperationExecutor rollbackOperation = (RenameOperationExecutor) operation; assertThat(rollbackOperation.getLdapOperations()).isSameAs(ldapOperationsMock); assertThat(rollbackOperation.getNewDn().toString()).isEqualTo("ou=newou"); assertThat(rollbackOperation.getOriginalDn().toString()).isEqualTo("ou=someou"); }
public CompensatingTransactionOperationExecutor recordOperation( Object[] args) { log.debug("Storing rollback information for rename operation"); Assert.notEmpty(args); if (args.length != 2) { throw new IllegalArgumentException("Illegal argument length"); } Name oldDn = LdapTransactionUtils.getArgumentAsName(args[0]); Name newDn = LdapTransactionUtils.getArgumentAsName(args[1]); return new RenameOperationExecutor(ldapOperations, oldDn, newDn); }
RenameOperationRecorder implements
        CompensatingTransactionOperationRecorder { public CompensatingTransactionOperationExecutor recordOperation( Object[] args) { log.debug("Storing rollback information for rename operation"); Assert.notEmpty(args); if (args.length != 2) { throw new IllegalArgumentException("Illegal argument length"); } Name oldDn = LdapTransactionUtils.getArgumentAsName(args[0]); Name newDn = LdapTransactionUtils.getArgumentAsName(args[1]); return new RenameOperationExecutor(ldapOperations, oldDn, newDn); } }
RenameOperationRecorder implements
        CompensatingTransactionOperationRecorder { public CompensatingTransactionOperationExecutor recordOperation( Object[] args) { log.debug("Storing rollback information for rename operation"); Assert.notEmpty(args); if (args.length != 2) { throw new IllegalArgumentException("Illegal argument length"); } Name oldDn = LdapTransactionUtils.getArgumentAsName(args[0]); Name newDn = LdapTransactionUtils.getArgumentAsName(args[1]); return new RenameOperationExecutor(ldapOperations, oldDn, newDn); } RenameOperationRecorder(LdapOperations ldapOperations); }
RenameOperationRecorder implements
        CompensatingTransactionOperationRecorder { public CompensatingTransactionOperationExecutor recordOperation( Object[] args) { log.debug("Storing rollback information for rename operation"); Assert.notEmpty(args); if (args.length != 2) { throw new IllegalArgumentException("Illegal argument length"); } Name oldDn = LdapTransactionUtils.getArgumentAsName(args[0]); Name newDn = LdapTransactionUtils.getArgumentAsName(args[1]); return new RenameOperationExecutor(ldapOperations, oldDn, newDn); } RenameOperationRecorder(LdapOperations ldapOperations); CompensatingTransactionOperationExecutor recordOperation(
            Object[] args); }
RenameOperationRecorder implements
        CompensatingTransactionOperationRecorder { public CompensatingTransactionOperationExecutor recordOperation( Object[] args) { log.debug("Storing rollback information for rename operation"); Assert.notEmpty(args); if (args.length != 2) { throw new IllegalArgumentException("Illegal argument length"); } Name oldDn = LdapTransactionUtils.getArgumentAsName(args[0]); Name newDn = LdapTransactionUtils.getArgumentAsName(args[1]); return new RenameOperationExecutor(ldapOperations, oldDn, newDn); } RenameOperationRecorder(LdapOperations ldapOperations); CompensatingTransactionOperationExecutor recordOperation(
            Object[] args);  }