public void ReplaceClaim_ValueMatchesButTypeDoesNot_DoesNotReplace()
        {
            var role       = new IdentityRole();
            var firstClaim = new Claim("type", "sameValue");

            role.AddClaim(firstClaim);
            var newClaim = new Claim("newType", "sameValue");

            role.ReplaceClaim(new Claim("wrongType", "sameValue"), newClaim);

            role.ExpectOnlyHasThisClaim(firstClaim);
        }
        public void ReplaceClaim_TypeMatchesButValueDoesNot_DoesNotReplace()
        {
            var role       = new IdentityRole();
            var firstClaim = new Claim("sameType", "value");

            role.AddClaim(firstClaim);
            var newClaim = new Claim("sameType", "newValue");

            role.ReplaceClaim(new Claim("sameType", "wrongValue"), newClaim);

            role.ExpectOnlyHasThisClaim(firstClaim);
        }
        public void ReplaceClaim_ExistingClaim_Replaces()
        {
            var role       = new IdentityRole();
            var firstClaim = new Claim("type", "value");

            role.AddClaim(firstClaim);
            var newClaim = new Claim("newType", "newValue");

            role.ReplaceClaim(firstClaim, newClaim);

            role.ExpectOnlyHasThisClaim(newClaim);
        }