Hi,

On Mon, Jul 9, 2012 at 9:33 AM, MeriƧ Taze <[email protected]> wrote:
> I have a problem with sling test tool....

> @TestReference
> private static MyClass myClass;

That should work, I haven't tested it but looking at the code this
will only be set once an instance of the test test object is
created...

>
> @BeforeClass
> public static void beforeClass(){
>   myClass.create();
> }

...and the @BeforeClass method is probably caused before that happens,
so myClass wouldn't be set yet.

For now, as you indicate, the best might be to use @Before methods
that setup myClass only if it hasn't been setup yet.

-Bertrand

Reply via email to