This content has been marked as final.
Show 3 replies
-
1. Re: Love the test support in seam except for...
andrew.rw.robinson Dec 21, 2007 1:26 PM (in response to andrew.rw.robinson)For those that are interested, here is my hack:
TestBase.java:private static TestBase instance; /** * @see org.jboss.seam.mock.SeamTest#init() */ @Override @BeforeClass @BeforeSuite public synchronized void init() throws Exception { if (instance == null) { instance = this; super.init(); } else { for (Field field : BaseSeamTest.class.getDeclaredFields()) { field.setAccessible(true); field.set(this, field.get(instance)); } } } /** * @see org.jboss.seam.mock.SeamTest#cleanup() */ @Override @AfterSuite(alwaysRun = true) @AfterClass public synchronized void cleanup() throws Exception { if (instance == this) { super.cleanup(); instance = null; } else { for (Field field : BaseSeamTest.class.getDeclaredFields()) { if (field.getType().isPrimitive()) { continue; } field.setAccessible(true); field.set(this, null); } } }
-
2. Re: Love the test support in seam except for...
pmuir Dec 22, 2007 12:19 PM (in response to andrew.rw.robinson)Add a JIRA issue with this request and we can see what we can do.
-
3. Re: Love the test support in seam except for...
andrew.rw.robinson Dec 22, 2007 4:53 PM (in response to andrew.rw.robinson)Done
http://jira.jboss.org/jira/browse/JBSEAM-2424
Thanks,
Andrew