public async Task Invite_ProjectAdminSharingDisabled_UserInvited()
        {
            var env = new TestEnvironment();

            env.SetUser(User01, SystemRoles.User);
            env.SetProject(Project01);
            const string           email  = "*****@*****.**";
            RpcMethodSuccessResult result = await env.Controller.Invite(email) as RpcMethodSuccessResult;

            Assert.That(result, Is.Not.Null);
        }
        public async Task CheckLinkSharing_LinkSharingEnabled_UserJoined()
        {
            var env = new TestEnvironment();

            env.SetUser(User02, SystemRoles.User);
            env.SetProject(Project02);
            RpcMethodSuccessResult result = await env.Controller.CheckLinkSharing() as RpcMethodSuccessResult;

            Assert.That(result, Is.Not.Null);
            TestProjectEntity project = env.Projects.Get(Project02);

            Assert.That(project.Users.Any(pu => pu.UserRef == User02), Is.True);
        }
        public async Task Invite_LinkSharingEnabled_UserInvited()
        {
            var env = new TestEnvironment();

            env.SetUser(User01, SystemRoles.User);
            env.SetProject(Project02);
            const string           email  = "*****@*****.**";
            RpcMethodSuccessResult result = await env.Controller.Invite(email) as RpcMethodSuccessResult;

            Assert.That(result, Is.Not.Null);
            await env.EmailService.Received().SendEmailAsync(Arg.Is(email), Arg.Any <string>(),
                                                             Arg.Is <string>(body => body.Contains($"http://localhost/projects/{Project02}?sharing=true")));
        }