On Mon, May 2, 2011 at 4:40 PM, Bram de Kruijff <bdekrui...@gmail.com>wrote:
> Hi, > > On Thu, Apr 28, 2011 at 2:05 PM, Toni Menzel <t...@okidokiteam.com> wrote: > > Quick annswer (on mobile): > > @Inject public BundleContext m_bundleContext; > > is not support in 2.0.0. There is just parameter injection into the test > > method (see examples). > > Same for @Before/After. Its because Exam2 is pretty much independent of > > JUnit4 now. > > We will add support for @Before in the subsequent release, but not in > stock > > 2.0.0. > > Long explanation possibly on a real computer later. ;) > > Thanks for that reply Toni. Working around that I'm running into a > strange (to me at least) issue :S The plan was to put some generic > provision configuration options in a utility class called CoreFixture > is a seperate (reusable) library, so in my test I am able to do... > > @Configuration > public Option[] config() { > return options( > junitBundles(), > CoreFixture.provisionWithFsStorage(), > } > > > My maven test project has a dependecy on that library, it compiles but > at test time things go bad because the classes can not be found. The > problem seems to be that the classes from the library are not included > in the probe even though the package is mentioned in both > Import-Package and Export-Package statements when it is generated. > > So, is there a way to include stuff into the probe or am I going about > this in the wrong way? > > I have similar (if not same) set up.In my test set up, I explicitly provision the the library bundle that my tests depend on using a pax provision option. You can adding something like this in the above config(): return junitBundles(), CoreFixture.provisionWithFsStorage(), mavenBundle().groupId("Your GroupId").artifactId("This library bundle artifact id").version("this library bundle's version") HTH, Sahoo
_______________________________________________ general mailing list general@lists.ops4j.org http://lists.ops4j.org/mailman/listinfo/general