Exemplo n.º 1
0
        public void Constructor_OwnedAndRequiredClaimsEmpty_IsSuccess()
        {
            var requiredClaims = new AuthorizationClaim[] { };
            var ownedClaims    = new AuthorizationClaim[] { };

            var authResult = new AuthResult(requiredClaims, ownedClaims);

            authResult.ShouldBeSuccessful();
        }
Exemplo n.º 2
0
        public void Constructor_OwnedClaimsContainsRequiredClaims_IsSuccess()
        {
            var requiredClaims = new AuthorizationClaim[]
            {
                AuthorizationClaim.ModerationWarn
            };

            var ownedClaims = new AuthorizationClaim[]
            {
                AuthorizationClaim.ModerationRead,
                AuthorizationClaim.ModerationWarn
            };

            var authResult = new AuthResult(requiredClaims, ownedClaims);

            authResult.ShouldBeSuccessful();
        }