Wicket
  1. Wicket
  2. WICKET-3145

MockWebApplication does not allow to manually clear cookiesOfThisSession

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.12
    • Fix Version/s: 1.4.19
    • Component/s: wicket
    • Labels:
      None

      Description

      MockWebApplication does not allow to manually clear cookiesOfThisSession

      Often it is needed for testing various cookie scenarios to have the ability to clear cookiesOfThisSession and sort of start fresh. Especially when reusing WicketTester between junit tests for faster performance and less initialization overhead.

      Workaround:
      Collection<?> cookiesOfThisSession = Utils.getFieldValue("cookiesOfThisSession", Collection.class, wicketTester);
      cookiesOfThisSession.clear();

        Activity

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Martin Makundi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.5h
              0.5h
              Remaining:
              Remaining Estimate - 0.5h
              0.5h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development