Netflix/karyon — pull request #46 by jmnarloch (2013-08-04 23:19:39+00:00)
Title: Initial Arquillian extension for Keyron Guice tests.

This is an initial version of an extension that is capable of injecting Keyron auto scanned components into the test case. The only requirement is to annotate the test with @KeyronAwareTest (we can change that name to something different :)).

Features:
* Injecting the Guice dependencies into a test case in the remote running container.
* Packaging the minimal sub set of Keyron classes/dependencies in order to run in the container.

How this works:
* Basicly the two important points of the implementations are the KeyronExtensionArchiveAppender, since we are deploying the code into the container, we need to package all the extension classes into a micro deployment. So this class does all the dirty work and creates the archive of the extension implementation classes. The second one is the KeyronTestEnricher, which simply enquires the injector and injects all the dependencies on the test.

TODO list:
* Some additional unit tests of the extension itself, at the moment I have left that untill we discuss the ext. shape in general.
* How to pass the Injector? At the moment I have added a static field directly to the KaryonGuiceContextListener.
* Decide what should be packaged by the default.
* How to identify the Keyron test? For that purpose I introduced the annotation (@KeyronAwareTest ), but we can use different approach.
* Where to put the code? I have added new sub module, but preferable I would split the keyron-extension and put there additional sub modules with one containing the test extension. Although, this brakes the existing artifact naming and I'm not aware how this affect other systems.