Antwort: Re: Re: {Disarmed} Antwort: [TEST] Apache Struts 7.0.0-M10 test build is ready

[email protected]
Newsgroups gmane.comp.jakarta.struts.devel
Message-ID <OFC14AAB22.10713D63-ONC1258BD3.0028BDEE-C1258BD3.00290391@silbergrau.com>
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" <[email protected]> schrieb: -----
An: [email protected]
Von: "Lukasz Lenart" <[email protected]>
Datum: 11.11.2024 17:42
Kopie: "Struts Developers List" <[email protected]>
Betreff: Re: Re: {Disarmed} Antwort: [TEST] Apache Struts 7.0.0-M10 test build is ready

pon., 11 lis 2024 o 08:45 <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.