Exemplo n.º 1
0
        public static bool CanBlockUser(
            IBlockedUserService blockedUserService,
            User actionUser,
            User otherUser)
        {
            // Validate
            blockedUserService.Should().NotBeNull();
            actionUser.Should().NotBeNull();
            otherUser.Should().NotBeNull();

            // Return whether or not the action user is part of the contact pair
            return(!blockedUserService.AreUsersBlocked(actionUser, otherUser));
        }
Exemplo n.º 2
0
        public static bool CanUnblockUser(
            IBlockedUserService blockedUserService,
            User actionUser,
            User blocked)
        {
            // Validate
            blockedUserService.Should().NotBeNull();
            actionUser.Should().NotBeNull();
            blocked.Should().NotBeNull();

            // Return whether or not the action user is part of the contact pair
            return(blockedUserService.IsUserBlocked(blocked, actionUser));
        }