1 write to SetCookie
Microsoft.AspNetCore.CookiePolicy.Test (1)
TestExtensions.cs (1)
29transaction.SetCookie = transaction.Response.Headers.GetValues("Set-Cookie").ToList();
74 references to SetCookie
Microsoft.AspNetCore.CookiePolicy.Test (74)
CookiePolicyTests.cs (71)
60Assert.NotNull(transaction.SetCookie); 61Assert.Equal("A=A; path=/; secure", transaction.SetCookie[0].AsSpan()); 62Assert.Equal("B=B; path=/; secure", transaction.SetCookie[1].AsSpan()); 63Assert.Equal("C=C; path=/; secure", transaction.SetCookie[2].AsSpan()); 64Assert.Equal("D=D; path=/; secure", transaction.SetCookie[3].AsSpan()); 80Assert.NotNull(transaction.SetCookie); 81Assert.Equal("A=A; path=/", transaction.SetCookie[0]); 82Assert.Equal("B=B; path=/", transaction.SetCookie[1]); 83Assert.Equal("C=C; path=/", transaction.SetCookie[2]); 84Assert.Equal("D=D; path=/; secure", transaction.SetCookie[3]); 100Assert.NotNull(transaction.SetCookie); 101Assert.Equal("A=A; path=/", transaction.SetCookie[0]); 102Assert.Equal("B=B; path=/", transaction.SetCookie[1]); 103Assert.Equal("C=C; path=/", transaction.SetCookie[2]); 104Assert.Equal("D=D; path=/; secure", transaction.SetCookie[3]); 109Assert.NotNull(transaction.SetCookie); 110Assert.Equal("A=A; path=/; secure", transaction.SetCookie[0]); 111Assert.Equal("B=B; path=/; secure", transaction.SetCookie[1]); 112Assert.Equal("C=C; path=/; secure", transaction.SetCookie[2]); 113Assert.Equal("D=D; path=/; secure", transaction.SetCookie[3]); 129Assert.NotNull(transaction.SetCookie); 130Assert.Equal("A=A; path=/; httponly", transaction.SetCookie[0]); 131Assert.Equal("B=B; path=/; httponly", transaction.SetCookie[1]); 132Assert.Equal("C=C; path=/; httponly", transaction.SetCookie[2]); 133Assert.Equal("D=D; path=/; httponly", transaction.SetCookie[3]); 149Assert.NotNull(transaction.SetCookie); 150Assert.Equal("A=A; path=/", transaction.SetCookie[0]); 151Assert.Equal("B=B; path=/", transaction.SetCookie[1]); 152Assert.Equal("C=C; path=/", transaction.SetCookie[2]); 153Assert.Equal("D=D; path=/; httponly", transaction.SetCookie[3]); 169Assert.NotNull(transaction.SetCookie); 170Assert.Equal("A=A; path=/; samesite=strict", transaction.SetCookie[0]); 171Assert.Equal("B=B; path=/; samesite=strict", transaction.SetCookie[1]); 172Assert.Equal("C=C; path=/; samesite=strict", transaction.SetCookie[2]); 173Assert.Equal("D=D; path=/; samesite=strict", transaction.SetCookie[3]); 174Assert.Equal("E=E; path=/; samesite=strict", transaction.SetCookie[4]); 190Assert.NotNull(transaction.SetCookie); 191Assert.Equal("A=A; path=/; samesite=lax", transaction.SetCookie[0]); 192Assert.Equal("B=B; path=/; samesite=lax", transaction.SetCookie[1]); 193Assert.Equal("C=C; path=/; samesite=lax", transaction.SetCookie[2]); 194Assert.Equal("D=D; path=/; samesite=lax", transaction.SetCookie[3]); 195Assert.Equal("E=E; path=/; samesite=strict", transaction.SetCookie[4]); 211Assert.NotNull(transaction.SetCookie); 212Assert.Equal("A=A; path=/; samesite=none", transaction.SetCookie[0]); 213Assert.Equal("B=B; path=/; samesite=none", transaction.SetCookie[1]); 214Assert.Equal("C=C; path=/; samesite=none", transaction.SetCookie[2]); 215Assert.Equal("D=D; path=/; samesite=lax", transaction.SetCookie[3]); 216Assert.Equal("E=E; path=/; samesite=strict", transaction.SetCookie[4]); 232Assert.NotNull(transaction.SetCookie); 233Assert.Equal("A=A; path=/", transaction.SetCookie[0]); 234Assert.Equal("B=B; path=/", transaction.SetCookie[1]); 235Assert.Equal("C=C; path=/; samesite=none", transaction.SetCookie[2]); 236Assert.Equal("D=D; path=/; samesite=lax", transaction.SetCookie[3]); 237Assert.Equal("E=E; path=/; samesite=strict", transaction.SetCookie[4]); 238Assert.Equal("F=F; path=/", transaction.SetCookie[5]); 274Assert.NotNull(transaction.SetCookie); 275Assert.Equal("Hao=Hao; path=/", transaction.SetCookie[0]); 276Assert.Equal("Hao=Hao; path=/", transaction.SetCookie[1]); 277Assert.Equal("Hao=Hao; path=/; samesite=strict", transaction.SetCookie[2]); 278Assert.Equal("Hao=Hao; path=/; secure", transaction.SetCookie[3]); 313Assert.NotNull(transaction.SetCookie); 314Assert.Single(transaction.SetCookie); 315Assert.Equal("A=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; secure", transaction.SetCookie[0]); 398Assert.NotNull(transaction.SetCookie); 399Assert.Single(transaction.SetCookie); 400var cookie = SetCookieHeaderValue.Parse(transaction.SetCookie[0]); 449Assert.NotNull(transaction.SetCookie); 450Assert.Equal(3, transaction.SetCookie.Count); 452var cookie = SetCookieHeaderValue.Parse(transaction.SetCookie[0]); 460cookie = SetCookieHeaderValue.Parse(transaction.SetCookie[1]); 467cookie = SetCookieHeaderValue.Parse(transaction.SetCookie[2]);
Transaction.cs (3)
24if (SetCookie != null && SetCookie.Count > 0) 26var authCookie = SetCookie.SingleOrDefault(c => c.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme + "="));