1 8 9 package org.jboss.cache.tests.basic; 10 11 import junit.framework.Test; 12 import junit.framework.TestCase; 13 import junit.framework.TestSuite; 14 import org.jboss.cache.TreeCache; 15 16 22 public class CrudMethodTest extends TestCase { 23 24 25 public CrudMethodTest(String name) { 26 super(name); 27 } 28 29 public void testCrudMethods() { 30 assertTrue(TreeCache.isCrudMethod(TreeCache.putDataEraseMethodLocal)); 31 assertTrue(TreeCache.isCrudMethod(TreeCache.putDataMethodLocal)); 32 assertTrue(TreeCache.isCrudMethod(TreeCache.putKeyValMethodLocal)); 33 assertTrue(TreeCache.isCrudMethod(TreeCache.removeDataMethodLocal)); 34 assertTrue(TreeCache.isCrudMethod(TreeCache.removeKeyMethodLocal)); 35 assertTrue(TreeCache.isCrudMethod(TreeCache.removeNodeMethodLocal)); 36 37 assertFalse(TreeCache.isCrudMethod(TreeCache.getKeyValueMethodLocal)); 38 assertFalse(TreeCache.isCrudMethod(TreeCache.getNodeMethodLocal)); 39 assertFalse(TreeCache.isCrudMethod(TreeCache.getKeysMethodLocal)); 40 assertFalse(TreeCache.isCrudMethod(TreeCache.getChildrenNamesMethodLocal)); 41 } 42 43 44 45 public static Test suite() throws Exception { 46 return new TestSuite(CrudMethodTest.class); 47 } 48 49 public static void main(String [] args) throws Exception { 50 junit.textui.TestRunner.run(suite()); 51 } 52 53 54 } 55 | Popular Tags |