Hi, I'm building a test case with JUnit, I'm trying to use the hole WW/XW engine ...
while trying to put an object into the session map I'm getting a NPE ... At my action the code: ActionContext.getContext().put( ActionContext.SESSION, ActionContext.getContext(). getSession().put(Static.USER_SESSION_KEY, user) ); The setUp method from the test case: protected void setUp() throws Exception { super.setUp(); Static.setEnvironment(); XmlConfigurationProvider configurationProvider = new XmlConfigurationProvider( "xwork.xml"); ConfigurationManager.clearConfigurationProviders(); ConfigurationManager.addConfigurationProvider(configurationProvider); ConfigurationManager.getConfiguration().reload(); proxy = ActionProxyFactory.getFactory().createActionProxy("","login",null); userLogin = (UserLogin) proxy.getAction(); } One test method: public void testInvalidLogin() throws Exception { proxy.setExecuteResult(false); userLogin.setCelulaTecnica(new Integer(1)); userLogin.setPassword("0"); assertEquals(Action.ERROR,proxy.execute()); assertTrue(userLogin.hasErrors()); } How can I achive this? thanks + Samuel G. Mota + [EMAIL PROTECTED] + 55 (11) 4417 7093 + Business Application Dpt. + Netset Serviços em Tecnologia + a Hypercom Company + http://www.hypercom.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork