wood burning stoves 2.0*
The moose likes Other Application Frameworks and the fly likes Seam Test - Properties not being set by setValue() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Seam Test - Properties not being set by setValue()" Watch "Seam Test - Properties not being set by setValue()" New topic
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()
 
Similar Threads
Mapping ENUM('0', '1') or CHAR(0) for Boolean
Getting an exception in Hibernate as I try to integrate Struts2 and Hibernate3
Need help with Generics
ternary operator
Multiple level logic:iterate