public void IdentityPermissions_DataEntryDesignerWithoutAdminModulePermissions() { identityPermissions = new IdentityPermissions(true, agencyPermissions, null); Assert.IsNotNull(identityPermissions); var hasAdminModulePermissions = identityPermissions.HasAdminModulePermissions(Utils.agencyId, ModuleType.DataEntryDesigner); Assert.IsFalse(hasAdminModulePermissions); }
public void IdentityPermissions_ConfigurationManagementWithoutAdminModulePermissions() { identityPermissions = new IdentityPermissions(true, agencyPermissions, null); Assert.IsNotNull(identityPermissions); var hasAdminModulePermissions = identityPermissions.HasAdminModulePermissions(Utils.agencyId, ModuleType.ConfigurationManagement); Assert.IsFalse(hasAdminModulePermissions); }
public void IdentityPermissions_AgencyAdministrationWithoutAdminModulePermissions() { identityPermissions = new IdentityPermissions(true, agencyPermissions, null); Assert.IsNotNull(identityPermissions); var hasAdminModulePermissions = identityPermissions.HasAdminModulePermissions(Utils.agencyId, ModuleType.AgencyAdministration); Assert.IsFalse(hasAdminModulePermissions); }
public void IdentityPermissions_DataEntryDesignerHasAdminModulePermissions() { Mock <IAgencyPermissions> agencypermission = new Mock <IAgencyPermissions>(); agencypermission.SetupGet(a => a.CanAccessDataEntryDesigner).Returns(true); agencyPermissions = new Dictionary <Guid, IAgencyPermissions>(); agencyPermissions.Add(Utils.agencyId, agencypermission.Object); identityPermissions = new IdentityPermissions(true, agencyPermissions, null); Assert.IsNotNull(identityPermissions); var hasAdminModulePermissions = identityPermissions.HasAdminModulePermissions(Utils.agencyId, ModuleType.DataEntryDesigner); Assert.IsTrue(hasAdminModulePermissions); }
public void IdentityPermissions_ConfigurationManagementHasAdminModulePermissions() { Mock <IAgencyPermissions> agencypermission = new Mock <IAgencyPermissions>(); agencypermission.SetupGet(a => a.IsAgencyAdmin).Returns(true); agencyPermissions = new Dictionary <Guid, IAgencyPermissions>(); agencyPermissions.Add(Utils.agencyId, agencypermission.Object); identityPermissions = new IdentityPermissions(true, agencyPermissions, null); Assert.IsNotNull(identityPermissions); var hasAdminModulePermissions = identityPermissions.HasAdminModulePermissions(Utils.agencyId, ModuleType.ConfigurationManagement); Assert.IsTrue(hasAdminModulePermissions); }