KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > lockmanager > api > LockIDTest


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
3  * notice. All rights reserved.
4  */

5 package com.tc.object.lockmanager.api;
6
7 import junit.framework.TestCase;
8
9 /**
10  * TODO Nov 18, 2004:
11  */

12 public class LockIDTest extends TestCase {
13   public void tests() throws Exception JavaDoc {
14     assertTrue(LockLevel.isWrite(LockLevel.WRITE));
15     assertFalse(LockLevel.isRead(LockLevel.WRITE));
16
17     assertTrue(LockLevel.isWrite(LockLevel.SYNCHRONOUS_WRITE));
18     assertFalse(LockLevel.isRead(LockLevel.SYNCHRONOUS_WRITE));
19
20     assertFalse(LockLevel.isWrite(LockLevel.READ));
21     assertTrue(LockLevel.isRead(LockLevel.READ));
22
23   }
24 }
Popular Tags