From a33b642a50c56f40ddfd6afae0e3ed42eb1320a0 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Thu, 10 Jun 2021 14:41:10 -0600 Subject: [PATCH] Fix failing SetCookies_Success test (#53932) (#54014) * Fix failing SetCookies_Success test Co-authored-by: Viktor Hofer --- .../tests/UnitTests/CookieContainerTest.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libraries/System.Net.Primitives/tests/UnitTests/CookieContainerTest.cs b/src/libraries/System.Net.Primitives/tests/UnitTests/CookieContainerTest.cs index 6daad6860a7b2..f1134270d7d3b 100644 --- a/src/libraries/System.Net.Primitives/tests/UnitTests/CookieContainerTest.cs +++ b/src/libraries/System.Net.Primitives/tests/UnitTests/CookieContainerTest.cs @@ -125,11 +125,11 @@ public static IEnumerable SetCookiesData() yield return new object[] { u, - "name98=value98; path=/; domain=.uri.com; expires=Wed, 09 Jun 2021 10:18:14 GMT, name99=value99", + "name98=value98; path=/; domain=.uri.com; expires=Wed, 09 Jun 2050 10:18:14 GMT, name99=value99", new Cookie[] { new Cookie("name99", "value99"), - new Cookie("name98", "value98", "/", ".uri.com") { Expires = new DateTime(2021, 6, 9, 10, 18, 14) } + new Cookie("name98", "value98", "/", ".uri.com") { Expires = new DateTime(2050, 6, 9, 10, 18, 14) } } }; // Version0 @@ -169,11 +169,11 @@ public static IEnumerable SetCookiesData() yield return new object[] { uSecure, - "name98=value98; name98=value98; comment=comment; comment=comment2; commentURL=http://url.com; commentURL=commentURL2; discard; discard; domain=.uri.com; domain=domain2; max-age=400; max-age=400; path=/; path=path; port=\"80, 90, 443\"; port=port2; path=path; expires=Wed, 09 Jun 2021 10:18:14 GMT; expires=expires2; secure; secure; httponly; httponly; Version=100; Version=100, name99=value99", + "name98=value98; name98=value98; comment=comment; comment=comment2; commentURL=http://url.com; commentURL=commentURL2; discard; discard; domain=.uri.com; domain=domain2; max-age=400; max-age=400; path=/; path=path; port=\"80, 90, 443\"; port=port2; path=path; expires=Wed, 09 Jun 2050 10:18:14 GMT; expires=expires2; secure; secure; httponly; httponly; Version=100; Version=100, name99=value99", new Cookie[] { new Cookie("name99", "value99"), - new Cookie("name98", "value98", "/", ".uri.com") { Port = "\"80, 90, 443\"", Version = 100, Secure = true, HttpOnly = true, Discard = true, Expires = new DateTime(2021, 6, 9, 10, 18, 14), Comment = "comment", CommentUri = new Uri("http://url.com") } + new Cookie("name98", "value98", "/", ".uri.com") { Port = "\"80, 90, 443\"", Version = 100, Secure = true, HttpOnly = true, Discard = true, Expires = new DateTime(2050, 6, 9, 10, 18, 14), Comment = "comment", CommentUri = new Uri("http://url.com") } } }; // Double entries