tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: JSF-Testing with embedded TomEE: Manipulate injected object
Date Sat, 22 Apr 2017 13:55:22 GMT
Hi

You can @specializes the bean or just use a filter to do it

Le 22 avr. 2017 13:34, "hfe" <a@h41.de> a écrit :

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message