Java Reference
In-Depth Information
</arquillian>
That's all. Now your test will kick-start a JBoss AS 7 instance before deploying the
application on it. This JBoss AS 7 node will be shut down as soon as the test is com-
plete.
Enhancing your Arquillian test
You might have noticed that we have, on purpose, created just a part of the integ-
ration tests we needed. We did not reach the last mile, that is, creating seats and
reserving one. As a matter of fact, if you remember, our ticket application uses Con-
versationScope to track the user's navigation. Thus, we need to bind Conver-
sationScope into our test as well.
Luckily, the weld container provides all that you need with
org.jboss.weld.context.bound.BoundConversationContext that needs
to be injected into your test class:
@Inject BoundConversationContext
conversationContext;
@Before
public void init() {
conversationContext.associate(
new MutableBoundRequest(new
HashMap<String, Object>(),
new
HashMap<String, Object>()));
conversationContext.activate();
}
Search WWH ::




Custom Search