1 Reply Latest reply on Feb 17, 2008 1:57 PM by Pete Muir

    Is @BypassInterceptors going to be removed for Validators, C

    Daniel Hinojosa Master

      I hope it does soon.

      Component.getInstance("<<<ComponentName>>>")
      


      is such a pain in the ass, and makes unit testing real difficult

        • 1. Re: Is @BypassInterceptors going to be removed for Validator
          Pete Muir Master

          As we discussed no - as JSF controls the lifecycle, not us.

          Actually, Max Ross and I talked about this after you asked about it - of course, you can unit test this stuff, you just have to be careful about not calling Component.getInstance in your unit test - move out your validation logic like

          public boolean safeValidate(SeamComponent1 cmp1, SeamComponent2 cmp2) {


          Test this method rather than the validate method, and pass in null or the correct object or...