Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-1487

MockViewFactoryCreator$MockView.getFlowEvent() doesn't give attributes to created Event

    XMLWordPrintable

    Details

      Description

      When running tests on a flow, it seems user can't mock an event with attributes, since MockViewFactoryCreator$MockView.getFlowEvent() doesn't give attributes to created Event (for exemple, to mock user input).
      Worse, it seems user can't use another ViewFactoryCreator since :

      • MockViewFactoryCreator.createMockView() is called from TestFlowBuilderServicesFactory.getServices(), which is static and hence can't be overloaded
      • TestFlowBuilderServicesFactory.getServices() is called from MockFlowBuilderContext constructor, which could be sort of overloaded, but
      • MockFlowBuilderContext is instanciated statically (not using a factory) in AbstractExternalizedFlowExecutionTests.buildFlow(), which is final.

      So I could not figure out a workaround allowing me to mock an event with attributes. I may have searched the wrong places, but if it's the case I would greatly appreciate any help.

        Attachments

          Activity

            People

            Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            fenrhil Yoann Rodiere
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: