|
1 | | -/** |
2 | | - * OWASP Enterprise Security API (ESAPI) |
3 | | - * |
4 | | - * This file is part of the Open Web Application Security Project (OWASP) |
5 | | - * Enterprise Security API (ESAPI) project. For details, please see |
6 | | - * <a href="http://www.owasp.org/index.php/ESAPI">http://www.owasp.org/index.php/ESAPI</a>. |
7 | | - * |
8 | | - * Copyright (c) 2007 - The OWASP Foundation |
9 | | - * |
10 | | - * The ESAPI is published by OWASP under the BSD license. You should read and accept the |
11 | | - * LICENSE before you use, modify, and/or redistribute this software. |
12 | | - * |
13 | | - * @author Jeff Williams <a href="http://www.aspectsecurity.com">Aspect Security</a> |
14 | | - * @created 2007 |
15 | | - */ |
16 | | -package org.owasp.esapi.waf.internal; |
17 | | - |
18 | | -import junit.framework.Test; |
19 | | -import junit.framework.TestCase; |
20 | | -import junit.framework.TestSuite; |
21 | | - |
22 | | -import org.owasp.esapi.http.MockHttpServletRequest; |
23 | | - |
24 | | -/** |
25 | | - * @author Jeff Williams (jeff.williams@aspectsecurity.com) |
26 | | - */ |
27 | | -public class InterceptingHttpServletRequestTest extends TestCase { |
28 | | - |
29 | | - /** |
30 | | - * Instantiates a new test. |
31 | | - * |
32 | | - * @param testName |
33 | | - * the test name |
34 | | - */ |
35 | | - public InterceptingHttpServletRequestTest(String testName) { |
36 | | - super(testName); |
37 | | - } |
38 | | - |
39 | | - /** |
40 | | - * {@inheritDoc} |
41 | | - * @throws Exception |
42 | | - */ |
43 | | - protected void setUp() throws Exception { |
44 | | - // none |
45 | | - } |
46 | | - |
47 | | - /** |
48 | | - * {@inheritDoc} |
49 | | - * @throws Exception |
50 | | - */ |
51 | | - protected void tearDown() throws Exception { |
52 | | - // none |
53 | | - } |
54 | | - |
55 | | - /** |
56 | | - * Suite. |
57 | | - * |
58 | | - * @return the test |
59 | | - */ |
60 | | - public static Test suite() { |
61 | | - TestSuite suite = new TestSuite(InterceptingHttpServletRequestTest.class); |
62 | | - return suite; |
63 | | - } |
64 | | - |
65 | | - |
66 | | - /** |
67 | | - * Test. |
68 | | - */ |
69 | | - public void testRequest() throws Exception { |
70 | | - System.out.println("InterceptingHTTPServletRequest"); |
71 | | - MockHttpServletRequest mreq = new MockHttpServletRequest(); |
72 | | - mreq.setMethod( "GET" ); |
73 | | - InterceptingHTTPServletRequest ireq = new InterceptingHTTPServletRequest(mreq); |
74 | | - assertEquals( mreq.getMethod(), ireq.getMethod() ); |
75 | | - } |
76 | | -} |
| 1 | +/** |
| 2 | + * OWASP Enterprise Security API (ESAPI) |
| 3 | + * |
| 4 | + * This file is part of the Open Web Application Security Project (OWASP) |
| 5 | + * Enterprise Security API (ESAPI) project. For details, please see |
| 6 | + * <a href="http://www.owasp.org/index.php/ESAPI">http://www.owasp.org/index.php/ESAPI</a>. |
| 7 | + * |
| 8 | + * Copyright (c) 2007 - The OWASP Foundation |
| 9 | + * |
| 10 | + * The ESAPI is published by OWASP under the BSD license. You should read and accept the |
| 11 | + * LICENSE before you use, modify, and/or redistribute this software. |
| 12 | + * |
| 13 | + * @author Jeff Williams <a href="http://www.aspectsecurity.com">Aspect Security</a> |
| 14 | + * @created 2007 |
| 15 | + */ |
| 16 | +package org.owasp.esapi.waf.internal; |
| 17 | + |
| 18 | +import junit.framework.Test; |
| 19 | +import junit.framework.TestCase; |
| 20 | +import junit.framework.TestSuite; |
| 21 | + |
| 22 | +import org.owasp.esapi.http.MockHttpServletRequest; |
| 23 | + |
| 24 | +/** |
| 25 | + * @author Jeff Williams (jeff.williams@aspectsecurity.com) |
| 26 | + */ |
| 27 | +public class InterceptingHttpServletRequestTest extends TestCase { |
| 28 | + |
| 29 | + /** |
| 30 | + * Instantiates a new test. |
| 31 | + * |
| 32 | + * @param testName |
| 33 | + * the test name |
| 34 | + */ |
| 35 | + public InterceptingHttpServletRequestTest(String testName) { |
| 36 | + super(testName); |
| 37 | + } |
| 38 | + |
| 39 | + /** |
| 40 | + * {@inheritDoc} |
| 41 | + * @throws Exception |
| 42 | + */ |
| 43 | + protected void setUp() throws Exception { |
| 44 | + // none |
| 45 | + } |
| 46 | + |
| 47 | + /** |
| 48 | + * {@inheritDoc} |
| 49 | + * @throws Exception |
| 50 | + */ |
| 51 | + protected void tearDown() throws Exception { |
| 52 | + // none |
| 53 | + } |
| 54 | + |
| 55 | + /** |
| 56 | + * Suite. |
| 57 | + * |
| 58 | + * @return the test |
| 59 | + */ |
| 60 | + public static Test suite() { |
| 61 | + TestSuite suite = new TestSuite(InterceptingHttpServletRequestTest.class); |
| 62 | + return suite; |
| 63 | + } |
| 64 | + |
| 65 | + |
| 66 | + /** |
| 67 | + * Test. |
| 68 | + */ |
| 69 | + public void testRequest() throws Exception { |
| 70 | + System.out.println("InterceptingHTTPServletRequest"); |
| 71 | + MockHttpServletRequest mreq = new MockHttpServletRequest(); |
| 72 | + mreq.setMethod( "GET" ); |
| 73 | + InterceptingHTTPServletRequest ireq = new InterceptingHTTPServletRequest(mreq); |
| 74 | + assertEquals( mreq.getMethod(), ireq.getMethod() ); |
| 75 | + } |
| 76 | +} |
0 commit comments