Dinesh N wrote:

Hi Friends,
    I am new to this technology. I am testing a jsp page which do some operation on 
java compiled class.

Now i have created some test case like:

public void teststringArray3()
        {
                 System.out.println("Value is 
"+session.getServletContext().getAttribute("stringArray3Count"));


assertSame("This should be same","1",session.getServletContext().getAttribute("stringArray3Count"));

Don't use assertSame() here, anyway: there is no way that the servlet context will return the same String object as the literal string "1". Use assertEquals() instead.


As for why the servlet context attribute has a null value, we need to see more code, such as the code that puts "stringArray3Count" in the servlet context in the first place.
--
J. B. Rainsberger,
Diaspar Software Services
http://www.diasparsoftware.com :: +1 416 791-8603
Let's write software that people understand


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to