Hallo Lukasz,

for sure - the Test and Action is quite simple


public class DispatcherTest extends StrutsJUnit4TestCase<Object> {
        
        @Test
        public void testParameters() throws UnsupportedEncodingException, 
ServletException {
                request.addParameter("test", "me");
                executeAction("/test/dispatcher/execute.html");
                assertEquals("me", 
findValueAfterExecute("#parameters.test[0]"));
                assertEquals("bar", findValueAfterExecute("#parameters.foo"));
        }


}

@Namespace("/test/dispatcher")
public class DispatcherAction extends ActionSupport {


        private static final long serialVersionUID = -3862841999204939579L;


        @Action(value = "execute", results = @Result(name = SUCCESS, type = 
"dispatcher", location = "index.jsp?foo=bar"))
        @Override
        public String execute() throws Exception {
                return super.execute();
        }


}



-----"Lukasz Lenart" <lukaszlen...@apache.org> schrieb: -----
An: michael.hinten...@silbergrau.com
Von: "Lukasz Lenart" <lukaszlen...@apache.org>
Datum: 11.11.2024 17:42
Kopie: "Struts Developers List" <dev@struts.apache.org>
Betreff: Re: Re: {Disarmed} Antwort: [TEST] Apache Struts 7.0.0-M10 test build 
is ready

pon., 11 lis 2024 o 08:45 <michael.hinten...@silbergrau.com> napisał(a):
>
> Hello Lukasz,
>
> look good to me, our Unit-Tests are fine again.

Is it possible to share your unit test in this case? I would like to
understand how you use "parameters".


Thanks in advance
Łukasz

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org



Reply via email to