1 8 9 package org.jboss.test.cache.test.local; 10 11 import junit.framework.Test; 12 import junit.framework.TestCase; 13 import junit.framework.TestSuite; 14 import org.jboss.cache.TreeCache; 15 import org.jboss.cache.Fqn; 16 import org.jboss.cache.lock.IsolationLevel; 17 import org.jboss.cache.transaction.DummyTransactionManager; 18 import org.jboss.logging.Logger; 19 20 import javax.naming.Context ; 21 import javax.naming.InitialContext ; 22 import javax.transaction.UserTransaction ; 23 import java.util.Properties ; 24 25 31 public class CrudMethodUnitTestCase extends TestCase { 32 33 34 public CrudMethodUnitTestCase(String name) { 35 super(name); 36 } 37 38 public void testCrudMethods() { 39 assertTrue(TreeCache.isCrudMethod(TreeCache.putDataEraseMethodLocal)); 40 assertTrue(TreeCache.isCrudMethod(TreeCache.putDataMethodLocal)); 41 assertTrue(TreeCache.isCrudMethod(TreeCache.putKeyValMethodLocal)); 42 assertTrue(TreeCache.isCrudMethod(TreeCache.removeDataMethodLocal)); 43 assertTrue(TreeCache.isCrudMethod(TreeCache.removeKeyMethodLocal)); 44 assertTrue(TreeCache.isCrudMethod(TreeCache.removeNodeMethodLocal)); 45 46 assertFalse(TreeCache.isCrudMethod(TreeCache.getKeyValueMethodLocal)); 47 assertFalse(TreeCache.isCrudMethod(TreeCache.getNodeMethodLocal)); 48 assertFalse(TreeCache.isCrudMethod(TreeCache.getKeysMethodLocal)); 49 assertFalse(TreeCache.isCrudMethod(TreeCache.getChildrenNamesMethodLocal)); 50 } 51 52 53 54 public static Test suite() throws Exception { 55 return new TestSuite(CrudMethodUnitTestCase.class); 56 } 57 58 public static void main(String [] args) throws Exception { 59 junit.textui.TestRunner.run(suite()); 60 } 61 62 63 } 64 | Popular Tags |