1 10 11 package com.triactive.jdo.test; 12 13 import javax.jdo.PersistenceManager; 14 import org.apache.log4j.Category; 15 16 17 24 25 public class BasicStorageTest extends StorageTestCase 26 { 27 private static final Category LOG = Category.getInstance(BasicStorageTest.class); 28 29 private boolean schemaInitialized = false; 30 31 32 38 39 public BasicStorageTest(String name) 40 { 41 super(name); 42 } 43 44 45 protected void setUp() throws Exception 46 { 47 super.setUp(); 48 49 if (!schemaInitialized) 50 { 51 addClassesToSchema(new Class [] 52 { 53 Widget.class, 54 DateWidget.class, 55 DecimalWidget.class, 56 FloatWidget.class, 57 StringWidget.class, 58 BinaryWidget.class, 59 CollectionWidget.class, 60 SetWidget.class, 61 ElementWidget.class, 62 MapWidget.class, 63 ValueWidget.class, 64 HashtableWidget.class, 65 KeywordConflict.class, 66 AReallyObnoxiouslyLongWindedNamedObject.class 67 } 68 ); 69 70 schemaInitialized = true; 71 } 72 } 73 74 75 public void testStringWidgets() throws Exception 76 { 77 runStorageTestFor(StringWidget.class); 78 } 79 80 public void testBinaryWidgets() throws Exception 81 { 82 runStorageTestFor(BinaryWidget.class); 83 } 84 85 public void testDateWidgets() throws Exception 86 { 87 runStorageTestFor(DateWidget.class); 88 } 89 90 public void testDecimalWidgets() throws Exception 91 { 92 runStorageTestFor(DecimalWidget.class); 93 } 94 95 public void testFloatWidgets() throws Exception 96 { 97 runStorageTestFor(FloatWidget.class); 98 } 99 100 public void testCollectionWidgets() throws Exception 101 { 102 runStorageTestFor(CollectionWidget.class); 103 } 104 105 public void testSetWidgets() throws Exception 106 { 107 runStorageTestFor(SetWidget.class); 108 } 109 110 public void testMapWidgets() throws Exception 111 { 112 runStorageTestFor(MapWidget.class); 113 } 114 115 public void testHashtableWidgets() throws Exception 116 { 117 runStorageTestFor(HashtableWidget.class); 118 } 119 120 public void testClassUsingSQLKeywords() throws Exception 121 { 122 runStorageTestFor(KeywordConflict.class); 123 } 124 125 public void testClassWithLongName() throws Exception 126 { 127 runStorageTestFor(AReallyObnoxiouslyLongWindedNamedObject.class); 128 } 129 } 130 | Popular Tags |