01: package net.sourceforge.jaxor.util.tests;
02:
03: import junit.framework.TestCase;
04: import net.sourceforge.jaxor.api.UnitOfWork;
05: import net.sourceforge.jaxor.util.NullProxy;
06:
07: import java.sql.Connection;
08:
09: /*
10: * User: Mike
11: * Date: Oct 18, 2002
12: * Time: 9:40:25 PM
13: */
14:
15: public class NullProxyTest extends TestCase {
16:
17: public void testWithUnrelatedInterfaces() throws Exception {
18: Object obj = NullProxy.create(new Class[] { UnitOfWork.class,
19: Connection.class });
20: assertNotNull(obj);
21: UnitOfWork uow = (UnitOfWork) obj;
22: uow.flush(null);
23: Connection con = (Connection) obj;
24: con.commit();
25: }
26: }
|