I am using Seam 1.2.1GA and  testng-4.5.1

Following test case gives me an exception:

  | @Test(groups = { "login" })
  |     public void testSuccessfulLogin() throws Exception{
  |             
  |              new FacesRequest() {
  |              
  |              @Override
  |              protected void invokeApplication()
  |              {
  |                 assert !isSessionInvalid();
  |                 assert getValue("#{identity.loggedIn}").equals(false);
  |              }
  |              
  |           }.run();
  | 
  |             new FacesRequest(){
  |                     
  |                     @Override
  |                     protected void updateModelValues() throws Exception{
  |                             setValue("#{identity.username}","username");
  |                             setValue("#{identity.password}","password");    
                        
  |                     }
  |                     
  |                     @Override 
  |                     protected void invokeApplication(){
  |                             invokeMethod("#{identity.login}");              
                
  |                     }
  |                     
  |                     @Override
  |                     protected void renderResponse(){                        
                                
  |                             assert 
getValue("#{user.givenName}").equals("Given");
  |                             assert 
getValue("#{user.lastName}").equals("Last");
  |                     
  |                     }
  |             }.run();
  |     }
  | 

Exception:


  | javax.el.PropertyNotFoundException: ELResolver cannot handle a null base 
Object with identifier 'user'
  |     at com.sun.el.lang.ELSupport.throwUnhandled(ELSupport.java:52)
  |     at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:75)
  |     at com.sun.el.parser.AstValue.getValue(AstValue.java:114)
  |     at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:195)
  |     at 
org.jboss.seam.util.UnifiedELValueBinding.getValue(UnifiedELValueBinding.java:34)
  |     at org.jboss.seam.mock.SeamTest$Request.getValue(SeamTest.java:366)
  |     at 
us.crimnet.iss.security.test.LoginTest$2.renderResponse(LoginTest.java:43)
  |     at org.jboss.seam.mock.SeamTest$Request.run(SeamTest.java:521)
  |     at 
us.crimnet.iss.security.test.LoginTest.testSuccessfulLogin(LoginTest.java:49)
  |     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |     at java.lang.reflect.Method.invoke(Method.java:585)
  |     at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:529)
  |     at org.testng.internal.Invoker.invokeMethod(Invoker.java:398)
  |     at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:625)
  |     at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:88)
  |     at org.testng.TestRunner.privateRun(TestRunner.java:614)
  |     at org.testng.TestRunner.run(TestRunner.java:505)
  |     at org.testng.SuiteRunner.privateRun(SuiteRunner.java:221)
  |     at org.testng.SuiteRunner.run(SuiteRunner.java:147)
  |     at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:576)
  |     at org.testng.TestNG.runSuitesLocally(TestNG.java:539)
  |     at org.testng.TestNG.run(TestNG.java:316)
  |     at org.testng.TestNG.privateMain(TestNG.java:666)
  |     at org.testng.TestNG.main(TestNG.java:608)
  | 
  | 

Can anyone suggest how to fix this error?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083148#4083148

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083148
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to