public void GivenEditProvider_WhenCreate_ThenReturnManageProviderPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("EditProvider", 1); Assert.IsInstanceOfType(actual, typeof(ManageProviderPermission)); }
public void GivenEditScheduledOffering_WhenCreate_ThenReturnManageAssignedOfferingPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("EditScheduledOffering", new StudentAssignedOffering()); Assert.IsInstanceOfType(actual, typeof(ManageAssignedOfferingPermission)); }
public void GivenSetServiceTypePrivacy_WhenCreate_ThenReturnSetServiceTypePrivacyPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("SetServiceTypePrivacy"); Assert.IsInstanceOfType(actual, typeof(SetServiceTypePrivacyPermission)); }
public void GivenSetFavoriteServiceOffering_WhenCreate_ThenReturnManageProviderPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("SetFavoriteServiceOffering", 1); Assert.IsInstanceOfType(actual, typeof(ManageProviderPermission)); }
public void GivenStudentProfileExportCustomFieldData_WhenCreate_ThenReturnCustomFieldDataPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("StudentProfileExportCustomFieldData", new PublicField()); Assert.IsInstanceOfType(actual, typeof(CustomFieldDataPermission)); }
public void WhenCreateServiceRequestString_WhenCreate_ThenReturnManageServiceRequestPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("CreateServiceRequestString", new ServiceRequest()); Assert.IsInstanceOfType(actual, typeof(ManageServiceRequestPermission)); }
public void GivenScheduleOffering_WhenCreate_ThenReturnScheduleOfferingPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("ScheduleOffering", new List<Student> { new Student() }, new ServiceOffering()); Assert.IsInstanceOfType(actual, typeof(ScheduleOfferingPermission)); }
public void GivenProcessDataFile_WhenCreate_ThenReturnManageCustomFieldPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("ProcessDataFile", new Student()); Assert.IsInstanceOfType(actual, typeof(ManageCustomFieldPermission)); }
public void GivenDeleteServiceAttendance_WhenCreate_ThenReturnManageServiceAttendancePermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("DeleteServiceAttendance", new StudentAssignedOffering()); Assert.IsInstanceOfType(actual, typeof(ManageServiceAttendancePermission)); }
public void GivenGenerateStudentProfileExport_WhenCreate_ThenReturnViewStudentDetailPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("StudentProfileExportMapData", new Student()); Assert.IsInstanceOfType(actual, typeof(ViewStudentDetailPermission)); }
public void GivenCreateServiceRequest_WhenCreate_ThenReturnCreateServiceRequestPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("CreateServiceRequest", new List<Student>()); Assert.IsInstanceOfType(actual, typeof(CreateServiceRequestPermission)); }
public void GivenDeleteRequest_WhenCreate_ThenReturnManageServiceRequestPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("DeleteRequest", new ServiceRequest()); Assert.IsInstanceOfType(actual, typeof(ManageServiceRequestPermission)); }
public void GivenCreateStudentNameString_WhenCreate_ThenReturnViewStudentDetailPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("CreateStudentNameString", new Student()); Assert.IsInstanceOfType(actual, typeof(ViewStudentDetailPermission)); }
public void GivenImportOfferingData_WhenCreate_ThenReturnImportOfferingDataPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("ImportOfferingData", new ServiceOffering()); Assert.IsInstanceOfType(actual, typeof(ImportOfferingDataPermission)); }
public void GivenActivityNameOnlyWhitespace_WhenCreate_ThenThrowException() { PermissionFactory target = new PermissionFactory(); TestExtensions.ExpectException<ArgumentNullException>(() => target.Create("\r\n \t", new Dictionary<string, object>())); }
public void GivenViewStudentCustomFieldData_WhenCreate_ThenReturnCustomFieldDataPermission() { PermissionFactory target = new PermissionFactory(); IPermission actual = target.Create("ViewStudentCustomFieldData", new PublicField()); Assert.IsInstanceOfType(actual, typeof(CustomFieldDataPermission)); }
public void GivenUnrecognizedActivityName_WhenCreate_ThenThrowException() { PermissionFactory target = new PermissionFactory(); target.ExpectException<InvalidOperationException>(() => target.Create("gibberish!!")); }
public void GivenEmptyActivityName_WhenCreate_ThenThrowException() { PermissionFactory target = new PermissionFactory(); TestExtensions.ExpectException<ArgumentNullException>(() => target.Create(string.Empty, new Dictionary<string, object>())); }