MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / properties

Method properties

src/test/java/org/htmlunit/util/CookieTest.java:83–96  ·  view source on GitHub ↗

@throws Exception if the test fails

()

Source from the content-addressed store, hash-verified

81 * @throws Exception if the test fails
82 */
83 @Test
84 public void properties() throws Exception {
85 final Cookie cookie = new Cookie("localhost", "Name ", "Value ", "/Path x ", new Date(1234567890),
86 true, true, "SameSite");
87
88 assertEquals("localhost", cookie.getDomain());
89 assertEquals("Name ", cookie.getName());
90 assertEquals("Value ", cookie.getValue());
91 assertEquals("/Path x ", cookie.getPath());
92 assertEquals(new Date(1234567890), cookie.getExpires());
93 assertTrue(cookie.isSecure());
94 assertTrue(cookie.isHttpOnly());
95 assertEquals("SameSite", cookie.getSameSite());
96 }
97
98 /**
99 * @throws Exception if the test fails

Callers

nothing calls this directly

Calls 10

getDomainMethod · 0.95
getNameMethod · 0.95
getValueMethod · 0.95
getPathMethod · 0.95
getExpiresMethod · 0.95
isSecureMethod · 0.95
isHttpOnlyMethod · 0.95
getSameSiteMethod · 0.95
assertTrueMethod · 0.80
assertEqualsMethod · 0.45

Tested by

no test coverage detected