[jboss-user] [JBoss Seam] - Re: Integration Testing with TestNG and embeddedEjb

b.reeve do-not-reply at jboss.com
Tue Oct 16 19:35:21 EDT 2007


I tried to see if the Spring Bean is resolved.

  | 
  | package test.testNG;
  | 
  | import org.jboss.seam.mock.SeamTest;
  | import org.testng.annotations.Test;
  | 
  | public class InjectionTestNG extends SeamTest{
  | 	
  | 	@Test
  | 	public void testInjection() throws Exception {
  | 		new FacesRequest(){				
  | 			
  | 			@Override
  | 			protected void updateModelValues(){
  | 				setValue("#{departmentSpring.departmentName}","Department");
  | 			}
  | 		}.run();
  | 	}
  | }
  | 
  | 

And it throws exception


  | FAILED: testInjection
  | javax.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier 'departmentSpring'
  | 	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.getTarget(AstValue.java:67)
  | 	at com.sun.el.parser.AstValue.setValue(AstValue.java:147)
  | 	at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:258)
  | 	at org.jboss.seam.util.UnifiedELValueBinding.setValue(UnifiedELValueBinding.java:44)
  | 	at org.jboss.seam.mock.SeamTest$Request.setValue(SeamTest.java:374)
  | 	at test.testNG.InjectionTestNG$1.updateModelValues(InjectionTestNG.java:19)
  | 	at org.jboss.seam.mock.SeamTest$Request.run(SeamTest.java:476)
  | 	at test.testNG.InjectionTestNG.testInjection(InjectionTestNG.java:21)
  | ... Removed 22 stack frames
  | 


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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095835



More information about the jboss-user mailing list