@throws Exception if the test fails
()
| 58 | * @throws Exception if the test fails |
| 59 | */ |
| 60 | @Test |
| 61 | public void value() throws Exception { |
| 62 | final Cookie cookie1 = new Cookie("localhost", "a", null, "/", null, false, false, null); |
| 63 | assertEquals("", cookie1.getValue()); |
| 64 | |
| 65 | final Cookie cookie2 = new Cookie("localhost", "a", "", "/", null, false, false, null); |
| 66 | assertEquals("", cookie2.getValue()); |
| 67 | |
| 68 | assertEquals(cookie1, cookie2); |
| 69 | assertEquals(cookie1.hashCode(), cookie2.hashCode()); |
| 70 | |
| 71 | final Cookie cookie3 = new Cookie("localhost", "a", "Ab", "/", null, false, false, null); |
| 72 | assertEquals("Ab", cookie3.getValue()); |
| 73 | |
| 74 | assertEquals(cookie1, cookie3); |
| 75 | assertEquals(cookie2, cookie3); |
| 76 | assertEquals(cookie1.hashCode(), cookie3.hashCode()); |
| 77 | assertEquals(cookie2.hashCode(), cookie3.hashCode()); |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * @throws Exception if the test fails |
no test coverage detected