Beispiel #1
0
        public void GivenAUserWithTheGroupClaim_IsInGroupShouldReturnTrue()
        {
            var user = new ClaimsPrincipalBuilder().WithGroup(Group).Build();

            user.IsInGroup(Group).Should().BeTrue();
        }
Beispiel #2
0
        public void GivenAUserWithAnotherGroupClaim_IsInGroupShouldReturnFalse()
        {
            var user = new ClaimsPrincipalBuilder().WithGroup("anotherGroup").Build();

            user.IsInGroup(Group).Should().BeFalse();
        }