| Author |
Seam Test - Properties not being set by setValue()
|
Henrique Ordine
Ranch Hand
Joined: Sep 03, 2004
Posts: 127
|
|
Hi everyone,
I wrote a SeamTest class where I call setValue() to set an action class' properties' values. When I call invokeMethod() to invoke a method of that class, it's properties are still null.
Could anyone please help?
Here's my test method:
@Test
public void solicitaAcesso() throws Exception {
new FacesRequest() {
@Override
protected void invokeApplication() {
setValue("#{login}", "TestNG");
setValue("#{nome}", "Test N. G.");
String result = (String) invokeAction("#{solicitarAcessoController.solicitaAcesso}");
}
}
}
And here's my action class:
@SuppressWarnings("serial")
@Name("solicitarAcessoController")
@Scope(ScopeType.PAGE)
public class SolicitarAcessoController {
...
@In(create=true)
@Out
private String login;
@In(create=true)
@Out
private String nome;
...
}
Thanks in advance.
|
J2EE Architect/Developer
|
 |
 |
|
|
subject: Seam Test - Properties not being set by setValue()
|
|
|