MyFaces Test
  1. MyFaces Test
  2. MYFACESTEST-52

ValueExpression mocks cannot return types for null references

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.4
    • Component/s: Mock Objects
    • Labels:
      None

      Description

      For example, MyFaces cannot deduce the proper converter for a given UIComponent if the target of its 'value' binding is null. Delegating to ELResolver.getType() fixes this.

        Issue Links

          Activity

          Matt Benson created issue -
          Matt Benson made changes -
          Field Original Value New Value
          Status Open [ 1 ] Patch Available [ 10002 ]
          Hide
          Matt Benson added a comment - - edited

          (includes changes from MYFACESTEST-51 patch)

          Show
          Matt Benson added a comment - - edited (includes changes from MYFACESTEST-51 patch)
          Matt Benson made changes -
          Attachment MYFACESTEST-52.patch.txt [ 12479922 ]
          Matt Benson made changes -
          Link This issue is related to EXTVAL-133 [ EXTVAL-133 ]
          Hide
          Rudy De Busscher added a comment -

          Isn't it easier to just return the expectedType passed in as constructor parameter?

          Show
          Rudy De Busscher added a comment - Isn't it easier to just return the expectedType passed in as constructor parameter?
          Hide
          Matt Benson added a comment -

          Easier, yes. Fully correct, no. Once again, this touches on the concept of "when does the mock framework become a full-fledged implementation of unified EL?" but I don't think we've reached that point yet. With both of us fully aware that I am working against extval's tests, when I return expectedType from MockValueExpression.getValue() I still can't pass all the tests while using the built-in MockApplicationFactory.

          Show
          Matt Benson added a comment - Easier, yes. Fully correct, no. Once again, this touches on the concept of "when does the mock framework become a full-fledged implementation of unified EL?" but I don't think we've reached that point yet. With both of us fully aware that I am working against extval's tests, when I return expectedType from MockValueExpression.getValue() I still can't pass all the tests while using the built-in MockApplicationFactory.
          Hide
          Rudy De Busscher added a comment -

          Modified the submitted patch code so that the proposed code is only run when getValue() returns null. Otherwise, there are scenarios where a concrete result (like String.class) is lost (return of Object.class). See org.apache.myfaces.test.el.MockValueExpressionTest#testGetType

          Show
          Rudy De Busscher added a comment - Modified the submitted patch code so that the proposed code is only run when getValue() returns null. Otherwise, there are scenarios where a concrete result (like String.class) is lost (return of Object.class). See org.apache.myfaces.test.el.MockValueExpressionTest#testGetType
          Rudy De Busscher made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Assignee Rudy De Busscher [ rdebusscher ]
          Fix Version/s 1.0.4-SNAPSHOT [ 12316445 ]
          Resolution Fixed [ 1 ]
          Leonardo Uribe made changes -
          Fix Version/s 1.0.4 [ 12317607 ]
          Fix Version/s 1.0.4-SNAPSHOT [ 12316445 ]
          Leonardo Uribe made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Patch Available Patch Available
          13s 1 Matt Benson 20/May/11 17:38
          Patch Available Patch Available Resolved Resolved
          9d 15h 54m 1 Rudy De Busscher 30/May/11 09:32
          Resolved Resolved Closed Closed
          78d 20h 47m 1 Leonardo Uribe 17/Aug/11 06:19

            People

            • Assignee:
              Rudy De Busscher
              Reporter:
              Matt Benson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development