Ejemplo n.º 1
0
 public void testWrappedObjectKeyActor() {
   Deity d = new Deity();
   d.setName("Bob");
   PCStat str = new PCStat();
   str.setName("Strength");
   BigDecimal expectedResult = new BigDecimal("4.063");
   str.put(ObjectKey.COST, expectedResult);
   df.set(id, d);
   d.put(ObjectKey.SPELL_STAT, CDOMDirectSingleRef.getRef(str));
   ObjectKeyActor<BigDecimal> oka_cost = new ObjectKeyActor<BigDecimal>(ObjectKey.COST);
   CDOMObjectWrapper.getInstance().load(str.getClass(), "cost", oka_cost);
   ObjectKeyActor<CDOMSingleRef<PCStat>> oka_stat =
       new ObjectKeyActor<CDOMSingleRef<PCStat>>(ObjectKey.SPELL_STAT);
   CDOMObjectWrapper.getInstance().load(d.getClass(), "stat", oka_stat);
   processThroughFreeMarker("${deity.stat}", str.getDisplayName());
   processThroughFreeMarker("${deity.stat.cost}", expectedResult.toString());
 }
Ejemplo n.º 2
0
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   if (!classSetUpRun) {
     classSetUp();
     classSetUpRun = true;
   }
   CDOMObjectWrapper.getInstance().clear();
 }
Ejemplo n.º 3
0
 public void testBasicObjectKeyActor() {
   Deity d = new Deity();
   d.setName("Bob");
   BigDecimal expectedResult = new BigDecimal("4.063");
   df.set(id, d);
   d.put(ObjectKey.COST, expectedResult);
   ObjectKeyActor<BigDecimal> oka = new ObjectKeyActor<BigDecimal>(ObjectKey.COST);
   CDOMObjectWrapper.getInstance().load(d.getClass(), "cost", oka);
   processThroughFreeMarker("${deity.cost}", expectedResult.toString());
 }