ClaimsPrincipalTestHelpers

A set of helpers to make it easier to test code that calls .

Syntax

public static class ClaimsPrincipalTestHelpers

Inheritance

Methods

SetSelector

[Obsolete("Please use BreakdanceTestBase.SetClaimsPrincipalSelectorToThreadPrincipal() instead.", false)]
public static void SetSelector(Claim claim, string authenticationType = "BreakdanceTests", string nameType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", string roleType = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role")
Sets the to a new ClaimsIdentity with the specified claims.

Parameters

  • claim Claim: The Claims to set for the test run.
  • authenticationType string: If needed, the AuthenticationType of the ClaimsIdentity. Defaults to “BreakdanceTests”.
  • nameType string: The ClaimType to specify for the Name claim. Defaults to .
  • roleType string: The ClaimType to specify for Role claims. Defaults to .

SetSelector

[Obsolete("Please use BreakdanceTestBase.SetClaimsPrincipalSelectorToThreadPrincipal() instead.", false)]
public static void SetSelector(List<Claim> claims, string authenticationType = "BreakdanceTests", string nameType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", string roleType = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role")
Sets the to a new ClaimsIdentity with the specified claims.

Parameters

  • claims List<Claim>: The Claims to set for the test run.
  • authenticationType string: If needed, the AuthenticationType of the ClaimsIdentity. Defaults to “BreakdanceTests”.
  • nameType string: The ClaimType to specify for the Name claim. Defaults to .
  • roleType string: The ClaimType to specify for Role claims. Defaults to .