Re: Why is @BeforeClass static
"David Saff" <[email protected]> Fri, 15 Aug 2008 16:02:44 -0400
| Newsgroups | gmane.comp.java.junit.devel |
|---|---|
| Message-ID | <[email protected]> |
I don't have experience with SeamTest. What you could do is use a
custom runner:
================================================
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.InitializationError;
public class SimulateTestNg extends BlockJUnit4ClassRunner {
private Object testInstance;
public SimulateTestNg(Class<?> klass) throws InitializationError {
super(klass);
}
@Override
protected Object createTest() throws Exception {
if (testInstance == null)
testInstance = super.createTest();
return testInstance;
}
}
================================================
@RunWith(SimulateTestNg.class)
public class MySeamTest extends SeamTest {
// tests here...
}
================================================
Would this work for you? Thanks,
David Saff
On Fri, Aug 8, 2008 at 4:22 AM, Bernard Łabno <[email protected]> wrote:
> Have you got experience with SeamTest ? I thought that init method must be
> run for every object that is instance of SeamTest.
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/