Skip to content

Commit 5f811cd

Browse files
committed
Adding some interface implementation for tests
1 parent 7922591 commit 5f811cd

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

src/Antiforgery/test/DefaultAntiforgeryTokenStoreTest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,11 @@ public void Append(string key, string value)
491491
throw new NotImplementedException();
492492
}
493493

494+
public void Append(IDictionary<string, string> keyValuePairs, CookieOptions options)
495+
{
496+
throw new NotImplementedException();
497+
}
498+
494499
public void Delete(string key, CookieOptions options)
495500
{
496501
throw new NotImplementedException();

src/Mvc/Mvc.ViewFeatures/test/CookieTempDataProviderTest.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) .NET Foundation. All rights reserved.
1+
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using System;
@@ -416,6 +416,19 @@ IEnumerator IEnumerable.GetEnumerator()
416416
{
417417
return GetEnumerator();
418418
}
419+
420+
public void Append(IDictionary<string, string> keyValuePairs, CookieOptions options)
421+
{
422+
foreach (var keyValuePair in keyValuePairs)
423+
{
424+
_cookies[keyValuePair.Key] = new CookieInfo()
425+
{
426+
Key = keyValuePair.Key,
427+
Value = keyValuePair.Value,
428+
Options = options
429+
};
430+
}
431+
}
419432
}
420433

421434
private CookieTempDataProvider GetProvider(IDataProtector dataProtector = null, CookieTempDataProviderOptions options = null)
@@ -501,4 +514,4 @@ public override byte[] Serialize(IDictionary<string, object> values)
501514
}
502515
}
503516
}
504-
}
517+
}

src/Security/CookiePolicy/test/CookieChunkingTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void AppendLargeCookie_WithOptions_Appended()
3131
{
3232
Domain = "foo.com",
3333
HttpOnly = true,
34-
SameSite = SameSiteMode.Strict,
34+
SameSite = Http.SameSiteMode.Strict,
3535
Path = "/bar",
3636
Secure = true,
3737
Expires = now.AddMinutes(5),

0 commit comments

Comments
 (0)