1 package servletunit.struts; 2 3 import junit.framework.TestCase; 4 5 public class TestPathFunctions extends TestCase { 6 7 public void testStripSessionId() { 8 String path = "/my/path;jsessionid=123456789"; 9 path = Common.stripJSessionID(path); 10 assertEquals("/my/path",path); 11 } 12 13 public void testStripLongSessionId() { 14 String path = "/my/path;jsessionid=99999999999999999999999999999999999999999999999999999999999"; 15 path = Common.stripJSessionID(path); 16 assertEquals("/my/path",path); 17 } 18 19 public void testStripSessionIdWithQueryString() { 20 String path = "/my/path;jsessionid=123456789?param=\"true\""; 21 path = Common.stripJSessionID(path); 22 assertEquals("/my/path?param=\"true\"",path); 23 } 24 } 25 | Popular Tags |