01: package org.xorm.tests;
02:
03: import junit.framework.*;
04:
05: import org.xorm.XORM;
06: import org.xorm.tests.model.*;
07: import javax.jdo.PersistenceManager;
08: import javax.jdo.JDOHelper;
09:
10: public class TestStringOps extends XORMTestCase {
11: public TestStringOps(String name) {
12: super (name);
13: }
14:
15: public void testStringOps() {
16: PersistenceManager mgr = factory.getPersistenceManager();
17: StringInterface pc = (StringInterface) XORM.newInstance(mgr,
18: StringInterface.class);
19: pc.setStringAttribute("TestString");
20: System.out.println("StringInterface.toString(): " + pc);
21:
22: StringClass sc = (StringClass) XORM.newInstance(mgr,
23: StringClass.class);
24: sc.setStringAttribute("TestString");
25: System.out.println("StringClass.toString(): " + sc);
26: StringClassBase scb = sc;
27: System.out.println("StringClassBase.toString(): " + scb);
28: Object o = scb;
29: System.out.println("Object.toString(): " + o);
30: }
31:
32: public static void main(String args[]) {
33: String[] testCaseName = { TestStringOps.class.getName() };
34: junit.textui.TestRunner.main(testCaseName);
35: }
36:
37: public static Test suite() {
38: return new TestSuite(TestStringOps.class);
39: }
40:
41: }
|