public void InviteWithNonExistentCommunityId_ShouldThrowException()
        {
            var invitation = CreateValidJoinInvitationRequest();

            invitation.CommunityId = Guid.Parse(NonExistentCommunityId);

            Func <Task <InvitationSent> > action = async() => await InviteUserToJoinACommunityUseCase.Invite(invitation);

            action.Should().Throw <AppNotFoundException>();
        }
        public void InviteWithEmptyCommunityId_ShouldThrowException()
        {
            var invitation = CreateValidJoinInvitationRequest();

            invitation.CommunityId = Guid.Empty;

            Func <Task <InvitationSent> > action = async() => await InviteUserToJoinACommunityUseCase.Invite(invitation);

            action.Should().Throw <AppArgumentException>();
        }
        public void InviteWith_InvitingUserId_ThatDontBelongToCommunityAdmins_ShouldThrowException()
        {
            var invitation = CreateValidJoinInvitationRequest();

            invitation.InvitingUserId = Guid.Parse(ExistentUserIdThatDontBelongToCommunityAdmins);

            Func <Task <InvitationSent> > action = async() => await InviteUserToJoinACommunityUseCase.Invite(invitation);

            action.Should().Throw <AppWithoutPermissionToPerformActionException>();
        }
        public void InviteNull_ShouldThrowException()
        {
            Func <Task <InvitationSent> > action = async() => await InviteUserToJoinACommunityUseCase.Invite(null);

            action.Should().Throw <AppArgumentException>();
        }