You don't need an appserver to do injection in tests.  In a test, you just
create the instance like you would normally.  I'll issue a pull request to
show you what I mean.


On Mon, Jul 15, 2013 at 10:43 AM, Ryan Carlson <notifications@github.com>wrote:

> In src/main/java/org/cru/crs/api/BlockResource.java:
>
> > +import javax.ws.rs.core.MediaType;
> > +import javax.ws.rs.core.Response;
> > +import javax.ws.rs.core.Response.Status;
> > +
> > +import org.cru.crs.model.BlockEntity;
> > +import org.cru.crs.model.PageEntity;
> > +import org.cru.crs.service.BlockService;
> > +import org.cru.crs.service.PageService;
> > +
> > +import com.google.common.base.Preconditions;
> > +
> > +@Stateless
> > +@Path("/blocks/{blockId}")
> > +public class BlockResource
> > +{
> > +	@Inject EntityManager em;
>
> Correct that you don't need an app server to test JPA, but you do need it
> to do the injection if the entity manager is injected.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/CruGlobal/conf-registration-api/pull/3/files#r5191091>
> .
>



-- 
*Matt Drees*
Web App Development
Cru Technology
matt.drees@cru.org