1 package org.apache.axis2.storage.impl; 2 3 import junit.framework.TestCase; 4 import org.apache.axis2.storage.AxisStorage; 5 6 23 public abstract class AbstractStorageTest extends TestCase{ 24 protected AxisStorage storage; 25 protected Object testValueObject; 26 27 public void testPutAndGet(){ 28 try { 29 Object key = storage.put(testValueObject); 30 assertEquals(testValueObject,storage.get(key)); 31 assertEquals(testValueObject,storage.remove(key)); 32 assertNull(storage.get(key)); 33 } catch (Exception e) { 34 fail(e.getMessage()); 35 } 36 } 37 38 protected void tearDown() throws Exception { 39 storage.clean(); 40 storage = null; 41 42 } 43 } 44 | Popular Tags |