tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject JSF-Testing with embedded TomEE: Manipulate injected object
Date Fri, 21 Apr 2017 19:33:27 GMT
I have a JSF-Project with one class called Label and one xhtml-page, called
label.xhtml. In label.xhtml the method Label.getValue() is called via
injection. The test LabelTest runs a embedded container and in the a test
method label.xhtml is requested and the body content will be checked. So far
everything is fine, but I would like to change the value of the attribute
Label.value in my test so the test can assert his own set value and not the
value of the Postconstruct-method of class Label.

I put a breakpoint in the constructor of class Label. So I can see the
stacktrace and I read the code of many of these methods. Maybe it is
possible to change the produces class, so I can put there my own
AbstractProducer in some way?

Code on GitHub <>  


View this message in context:
Sent from the TomEE Users mailing list archive at

View raw message