Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3145

MockWebApplication does not allow to manually clear cookiesOfThisSession

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.12
    • 1.4.19
    • wicket
    • 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();

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            mmakundi Martin Terra
            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