-
1. Re: Substituting ScopeType.APPLICATION components during tes
christian.bauer Mar 13, 2007 11:47 AM (in response to ccrouch)@Name=("productionInitializer")
@Install(precedence=MOCK)
public class MyMockProductionInitializer -
2. Re: Substituting ScopeType.APPLICATION components during tes
ccrouch Mar 13, 2007 11:57 AM (in response to ccrouch)Thanks Christian
Interesting, I don't see MOCK as an option described here:
http://docs.jboss.com/seam/1.2.0.GA/reference/en/html/annotations.html
How would this work exactly? When I was not running tests would I need comment out the @Name and @Install(precedence=MOCK) annotations on MyMockProductionInitializer in order to get my regular productionInitializer to be used?
Or is Seam smart enough to only kickin the @Install(precedence=MOCK) when running SeamTests?
Thanks -
3. Re: Substituting ScopeType.APPLICATION components during tes
gavin.king Mar 13, 2007 12:57 PM (in response to ccrouch)MOCK has the highest precedence so it is always used when it is in the classpth. Of course, you don't include mock objects in your deployment build, so they won't be there when you don't want them.
-
5. Re: Substituting ScopeType.APPLICATION components during tes
ccrouch Mar 13, 2007 1:08 PM (in response to ccrouch)Gotya. Very neat!
I'll raise a jira to clarify the doco in this area.
Thanks -
6. Re: Substituting ScopeType.APPLICATION components during tes
gavin.king Mar 13, 2007 1:10 PM (in response to ccrouch)I already updated that section you pointed to.
-
7. Re: Substituting ScopeType.APPLICATION components during tes
ccrouch Mar 13, 2007 2:06 PM (in response to ccrouch)Ok, I raised http://jira.jboss.com/jira/browse/JBSEAM-1043. Feel free to close as you see fit.
Cheers