Hi

nothing special is needed - this test uses it for instance
https://github.com/apache/tomee/blob/master/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/AutoBValTest.java

how do you write your test?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-06-29 23:48 GMT+02:00 gnanapandithan <m.gnanapandit...@gmail.com>:

> I am using TomEE 7.0.2 and developed simple JAX-RS web service . it is
> working good. I did unit test using  TestNG and Arquillian. In Arquillian
> @Deployment ( testable= false ) and  WARArchive deployment. using
> Restclient
> ( Jersy) I am invoking my service in unit test case and checking response
> status and response object. it is working good. I have added @valid (
> javax.validation) to validate my restful request. It is working good and
> throwing exception when I do real time ( WAR deployed in TomEE and tested
> via postman restclient)
>
> *But When I tried with unit test case , my request is not being validated
> by
> @valid.  please guide me how to enable @Valid in unit test case.
> *
>
> *I am using TomEE 7.0.2. Test NG, Arquillian and @Valid.
>
> I will appreciate if you share any example code for my scenario  *
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Valid-is-not-working-in-unit-test-cases-tp4681995.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to