protected void setup() { super.setup(); // Acquire first unit of work this.unitOfWork = getSession().acquireUnitOfWork(); this.nestedUnitOfWork = unitOfWork.acquireUnitOfWork(); this.unitOfWorkWorkingCopy = (Employee) this.unitOfWork.registerObject(this.objectToBeWritten); this.nestedUnitOfWorkWorkingCopy = (Employee) this.nestedUnitOfWork.registerObject(this.unitOfWorkWorkingCopy); }
protected void setup() { super.setup(); // Acquire first unit of work this.unitOfWork = getSession().acquireUnitOfWork(); this.unitOfWorkWorkingCopy = this.unitOfWork.registerObject(this.objectToBeWritten); changeUnitOfWorkWorkingCopy(); // Use the original session for comparision if (!compareObjects(this.originalObject, this.objectToBeWritten)) { throw new TestErrorException("The original object was changed through changing the clone."); } }