Menu

Multiple condition in Object level expression using xml configuration

kamalkant
2017-06-16
2017-06-16
  • kamalkant

    kamalkant - 2017-06-16

    Hi ,
    I have tried the Oval framework it looks promising to me. I have added one class level condition but it is not working as expected.

    <class type="com.xx.Account" overwrite="false" applyFieldConstraintsToSetters="true">

        <object>
            <assert lang="groovy" message="my message"  errorCode="my error" >
                <expr><![CDATA[_this.transactionIdProd != null && _this.transactionIdStage != null]]></expr>
            </assert>
        </object>
    

    </class>

    it is always showing error even when transactionIdProd is null and transactionIdStage is not null. I wanted to use OVal but I stuck with this issue.

    Thanks
    Kamal

     
  • Seb

    Seb - 2017-06-16

    Hi Kamal,

    please provide a JUnit TestCase that illustrates your issue.

    Thanks,
    Seb

     

Log in to post a comment.