tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hfe...@h41.de>
Subject JSF-Testing with embedded TomEE: Manipulate injected object
Date Fri, 21 Apr 2017 19:33:27 GMT
Hello, 
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 <https://github.com/feidner/stackoverflow-label>  

<http://tomee-openejb.979440.n4.nabble.com/file/n4681575/stacktrace.png> 







--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/JSF-Testing-with-embedded-TomEE-Manipulate-injected-object-tp4681575.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Mime
View raw message