use of org.eclipse.scout.rt.platform.util.concurrent.OptimisticLock in project scout.rt by eclipse.
the class OptimisticLockTest method testAcquireAndRelease.
@Test
public void testAcquireAndRelease() {
OptimisticLock l = new OptimisticLock();
l.acquire();
l.release();
assertFalse(l.isAcquired());
assertTrue(l.isReleased());
}
use of org.eclipse.scout.rt.platform.util.concurrent.OptimisticLock in project scout.rt by eclipse.
the class OptimisticLockTest method testMultipleAcquires.
@Test
public void testMultipleAcquires() {
OptimisticLock l = new OptimisticLock();
l.acquire();
l.acquire();
l.release();
assertTrue(l.isAcquired());
assertFalse(l.isReleased());
}
Aggregations