KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tirsen > nanning > samples > prevayler > TestUnsupportedTransactionImpl


1 package com.tirsen.nanning.samples.prevayler;
2
3 import com.tirsen.nanning.Aspects;
4 import junit.framework.Assert;
5
6 public class TestUnsupportedTransactionImpl implements TestUnsupportedTransaction {
7     public void callWithUnsupportedTransaction() {
8         Assert.assertFalse(CheckTransactionUnsupportedInterceptor.isTransactionsSupported());
9         MyObject myObject = (MyObject) Aspects.getCurrentAspectFactory().newInstance(MyObject.class);
10         myObject.setValue("test"); // this call should not be permitted
11
}
12 }
13
Popular Tags