Blog
Showing posts with label mock-contexts-extension. Show all posts
Showing posts with label mock-contexts-extension. Show all posts
Monday, 18 June 2012
Mock conversation
Mock-contexts-extension allows you to turn conversation and view scopes on for your Arquillian tests. However the Conversation implementation in Weld is so tightly bound to Weld that you need to create mock alternative for it.
Monday, 28 May 2012
Mock FacesContext in Arquillian
Recently I wanted to test my backing beans for JSF views. Unfortunately the EntityQuery (from seam3-persistence-framework) is very tightly bound to JSF api, particularly it depends on FacesContext.getCurrentInstance().getELContext(). The problem is that the tests are not associated with JSF requests, so FacesContext.getCurrentInstance() returns null.
I decided to extend mock-contexts-extension to help mocking FacesContext.
I decided to extend mock-contexts-extension to help mocking FacesContext.
Thursday, 19 April 2012
Mock contexts for Arquillian
Do you have @ViewScoped or @ConversationScoped annotated beans that you want to test with Arquillian?
Do you get "WELD-001303 No active contexts for scope type javax.enterprise.context.ConversationScoped"?
Well now you get mock-contexts-extension to the rescue.
Do you get "WELD-001303 No active contexts for scope type javax.enterprise.context.ConversationScoped"?
Well now you get mock-contexts-extension to the rescue.
Subscribe to:
Posts (Atom)