public void IdentityPermissions_CanNotAccessWorkflowDesigner() { identityPermissions = new IdentityPermissions(true, agencyPermissions, null); Assert.IsNotNull(identityPermissions); var canAccessWorkflowDesigner = identityPermissions.CanAccessWorkflowDesigner(Utils.agencyId); Assert.IsFalse(canAccessWorkflowDesigner); }
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); }