public void CanPerformRole_GIVEN_Ctor_user_Is_Null_THEN_Returns_False()
        {
            var mockedIdentity = new Mock<IJumbleblocksIdentity>();
            mockedIdentity.Setup(i => i.IsAuthenticated).Returns(true);

            var principal = new JumbleblocksPrincipal(mockedIdentity.Object, null);

            var result = principal.CanPerformRole("ABC");

            result.ShouldBeFalse();
        }
        public void CanPerformRole_GIVEN_Ctor_user_Has_Role_But_Identity_Is_Not_Authenticated_THEN_Returns_False()
        {
            const string RoleName = "ABC";

            var role = new Role { Name = RoleName };
            var user = new User();
            user.SetProperty(u => u.Id, 1);
            user.AddRole(role);

            var mockedIdentity = new Mock<IJumbleblocksIdentity>();
            mockedIdentity.Setup(i => i.IsAuthenticated).Returns(false);

            var principal = new JumbleblocksPrincipal(mockedIdentity.Object, user);

            var result = principal.CanPerformRole(RoleName);

            result.ShouldBeFalse();
        }