Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-798

Refactor Session construction in test code

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Default
    • Resolution: Unresolved
    • Affects Version/s: 1.5.3
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None

      Description

      Currently to create some of the Session related test cases it is necessary to use constructs like this:

      Session session = new Session(new UnitTestApplication(), new MemoryStoreFactory(),
      sessionID, null, null, new ScreenLogFactory(true, true, true),
      new DefaultMessageFactory(), isInitiator ? 30 : 0, false, 30, true, resetOnLogon,
      false, false, false, false, false, true, false, 1.5, null, validateSequenceNumbers,
      new int[]

      { 5 }

      , false, disconnectOnError, false, true, false, true, false, null,
      true, 0, false, false);

      This kind of code turns from an asset into a liability pretty quickly, so the sooner it is rationalised the better. The Session constructor itself isn't very pretty either with its 30+ parameters.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              andrzej_ls Andrzej Hajderek
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: