Hello everyone
I researching Jboss-Seam and relate to Integration Test. I only write a small example about Testing in Jboss-Seam, particular LoginTest.
My source code below:
@Test||
public void testLogin() throws Exception {
new FacesRequest("/login.xhtml") {
@Override
protected void updateModelValues() {
setValue("#{identity.username}", "hoakhung");
setValue("#{identity.password}", "abc123456");
}^^
@Override
protected void invokeApplication() {
invokeAction("#{identity.login}");
}
@Override
protected void renderResponse() {
assert getValue("#{identity.username}") != null;
}
}.run();
}
But running invokeApplication() method, seemly invokeAction("#{identity.login}") cannot return expected value. I think if invokeAction("#{identity.login}") called, it return true value but in my case, it always return false value. Please help me. Thanks for your advices.
``