9using System.Collections.Generic;
13using System.Diagnostics;
14using System.Security.Claims;
18using TestClass = NUnit.Framework.TestFixtureAttribute;
19using TestInitialize = NUnit.Framework.SetUpAttribute;
20using TestCleanup = NUnit.Framework.TearDownAttribute;
21using TestMethod = NUnit.Framework.TestAttribute;
23using Microsoft.VisualStudio.TestTools.UnitTesting;
35 private static ClaimsPrincipal GetPrincipal(params
string[] roles)
37 var identity =
new ClaimsIdentity();
38 foreach (var item
in roles)
39 identity.AddClaim(
new Claim(ClaimTypes.Role, item));
40 return new ClaimsPrincipal(identity);