<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi Stan,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Since ClientFacade is just a facade in front of HttpUnit, I think providing a getWebConversation method is a good idea. As you say, this allows the developer to use the convenience methods of the facade, but gives the developer full access when needed.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Regards,</DIV><DIV>Pieter.</DIV><DIV><BR><DIV><DIV>Op 16-aug-2007, om 15:52 heeft Stan Silvert het volgende geschreven:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hi Pieter,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thanks again for your feedback.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The simplest way I can see for adding this functionality to the ClientFacade would be to just provide access to the WebConversation.<SPAN class="Apple-converted-space">  </SPAN>So you would say:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">ClientFacade client = new ClientFacade("/foo.jsf");</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">client.getWebConversation().setHeaderField("Accept-Language", "es-mx,es");</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I've been a little leery about adding more HttpUnit-specific stuff to the ClientFacade.<SPAN class="Apple-converted-space">  </SPAN>But I think we have to give the developer full access when needed.<SPAN class="Apple-converted-space">  </SPAN>So, right now I think that adding getWebConversation() looks like the solution.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Any thoughts?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Stan</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:pieter.kuijpers@luminis.nl">pieter.kuijpers@luminis.nl</A> wrote:</DIV> <BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I'm testing a JSF application that has support for internationalization. Pages are rendered in the correct language based on the Accept-Language header in a request.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I can set the Accept-Language header in a unit test by invoking request.setHeaderField on a WebRequest that I have created through a WebConversation. I like the convenience of the ClientFacade though, and would like to use that instead of the WebConversationFactory / WebConversation.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">When I use the ClientFacade, there is no Accept-Language header set in the WebRequest. This results in ServletRequest.getLocale returning the server default Locale as the preferred locale for the request. Since I need the tests to run correctly on servers with different default locales, this is undesirable for me.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Is there a way to set the Accept-Language header when using ClientFacade for setting up the WebConversation? It would be best to be able to set the Locale once for the entire conversation, so that the correct header is set in each WebRequest.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Regards,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Pieter Kuijpers</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">------------------------------------------------------------------------</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">jsfunit-dev mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:jsfunit-dev@lists.jboss.org">jsfunit-dev@lists.jboss.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="https://lists.jboss.org/mailman/listinfo/jsfunit-dev">https://lists.jboss.org/mailman/listinfo/jsfunit-dev</A></DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV id="sig" style="font-family: Arial;color: #003366;"><SPAN class="Apple-style-span" style="color: rgb(0, 51, 102); font-family: Arial; ">--</SPAN><BR style="color: rgb(0, 51, 102); font-family: Arial; "><SPAN class="Apple-style-span" style="color: rgb(0, 51, 102); font-family: Arial; "> </SPAN><FONT class="Apple-style-span" color="#000000" face="Helvetica"><SPAN><IMG src="cid:6CEAC134-EABB-4E89-B280-216F40B14B4F@local"></SPAN><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV id="sig" style="font-family: Arial;color: #003366;"><SPAN style="color: #ff9900;font-weight: bold;font-style: normal;font-size: x-large;; font-family: Arial; font-size: 18px; "><SPAN class="Apple-style-span" style="color: rgb(255, 153, 0); font-family: Arial; font-size: 18px; font-weight: bold; ">Pieter Kuijpers</SPAN></SPAN><BR style="color: rgb(0, 51, 102); font-family: Arial; "><SPAN class="Apple-style-span" style="color: rgb(0, 51, 102); font-family: Arial; ">Senior software engineer </SPAN><B style="color: rgb(0, 51, 102); font-family: Arial; font-weight: bold; "><SPAN class="Apple-style-span" style="color: rgb(0, 51, 102); font-family: Arial; font-weight: bold; ">luminis</SPAN></B><SPAN class="Apple-style-span" style="color: rgb(0, 51, 102); font-family: Arial; ">®</SPAN><BR style="color: rgb(0, 51, 102); font-family: Arial; "><SPAN class="Apple-style-span" style="color: rgb(0, 51, 102); font-family: Arial; ">-------------------------------------------------</SPAN><BR style="color: rgb(0, 51, 102); font-family: Arial; "><SPAN class="Apple-style-span" style="color: rgb(0, 51, 102); font-family: Arial; ">06 174 185 34</SPAN><BR style="color: rgb(0, 51, 102); font-family: Arial; "><SPAN class="Apple-style-span" style="color: rgb(0, 51, 102); font-family: Arial; "><A href="mailto:pieter.kuijpers@luminis.nl">pieter.kuijpers@luminis.nl</A></SPAN><BR style="color: rgb(0, 51, 102); font-family: Arial; "><A href="http://www.luminis.nl/"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: Arial; -khtml-text-decorations-in-effect: underline; ">www.luminis.nl</SPAN></A><BR style="color: rgb(0, 51, 102); font-family: Arial; "><SPAN class="Apple-style-span" style="color: rgb(0, 51, 102); font-family: Arial; ">-------------------------------------------------</SPAN><P style="color: rgb(0, 51, 102); font-family: Arial; "></P></DIV><BR class="Apple-interchange-newline"></SPAN> </FONT></DIV><FONT class="Apple-style-span" color="#000000" face="Helvetica"></FONT></SPAN></DIV><BR></DIV></BODY></HTML>