Uploaded image for project: 'Magnolia Test Framework'
  1. Magnolia Test Framework
  2. MGNLTEST-148

MagnoliaHttpClient throws Nullpointer if user is null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 1.2.0
    • 1.1.0

      When using the Magnolia "builder" methods to set a path and an instance but keeping the user null, then public Request build() throws a Nullpointer.

       

      Example to reproduce

          @Test
          void serveResourceFromClasspath(MagnoliaHttpClient client) throws Exception {
              String resourcePath = "/.resources/test/classpath-test-resource.html";
      
              client.path(resourcePath).instance(DIRECT_AUTHOR);
              Request request = client.build();
              //Response response = client.get(request);
              // ... more stuff here
          }
      

      Expected: Request is build and can be used to get the response.

      Actual behaviour: client.build() throws a NullPointer.

       

      Unfortunately the recently released test-fwk 1.1.0 contains this bug.

       

       

       

        Acceptance criteria

              cmeier Christoph Meier
              cmeier Christoph Meier
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

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