コード例 #1
0
        public void IdentityPermissions_CanNotAccessWorkflowDesigner()
        {
            identityPermissions = new IdentityPermissions(true, agencyPermissions, null);
            Assert.IsNotNull(identityPermissions);
            var canAccessWorkflowDesigner = identityPermissions.CanAccessWorkflowDesigner(Utils.agencyId);

            Assert.IsFalse(canAccessWorkflowDesigner);
        }
コード例 #2
0
        public void IdentityPermissions_CanAccessWorkflowDesigner()
        {
            Mock <IAgencyPermissions> agencypermission = new Mock <IAgencyPermissions>();

            agencypermission.SetupGet(a => a.CanAccessWorkflowDesigner).Returns(true);

            agencyPermissions = new Dictionary <Guid, IAgencyPermissions>();
            agencyPermissions.Add(Utils.agencyId, agencypermission.Object);

            identityPermissions = new IdentityPermissions(true, agencyPermissions, null);
            Assert.IsNotNull(identityPermissions);
            var canAccessWorkflowDesigner = identityPermissions.CanAccessWorkflowDesigner(Utils.agencyId);

            Assert.IsTrue(canAccessWorkflowDesigner);
        }