Example #1
0
        public void GivenNullException_WhenAddModelErrors_ThenThrowException()
        {
            ModelStateDictionary target    = new ModelStateDictionary();
            ValidationException  exception = new ValidationException();

            TestExtensions.ExpectException <ArgumentNullException>(() => target.AddModelErrors(null));
        }
        public void GivenNullPermission_WhenTryGrantAccess_ThenArgumentNullException()
        {
            EducationSecurityPrincipal user = CreateUserWithNoRoles();
            IPermission permission          = null;

            TestExtensions.ExpectException <ArgumentNullException>(() => permission.TryGrantAccess(user));
        }
 public void GivenNullStudent_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new ViewStudentDetailPermission(null));
 }
Example #4
0
 public void GivenNullSecurityConfiguration_WhenIConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new UserClientDataTable(MockRequest, null));
 }
        public void GivenNullRequestor_WhenCreateAccessChangeEvent_ThenThrowException()
        {
            User user = new User();

            TestExtensions.ExpectException <ArgumentNullException>(() => Target.CreateAccessChangeEvent(user, null));
        }
 public void GivenNullOffering_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new ImportOfferingDataPermission(null));
 }
 public void GivenEmptyStudentList_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentException>(() => new ScheduleOfferingPermission(Enumerable.Empty <Student>(), new ServiceOffering()));
 }
Example #8
0
 public void GivenNullIExportFileFactory_WhenSetCurrent_ThenArgumentNullException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => ExportFileFactory.SetCurrent(null));
 }
Example #9
0
 public void GivenBlobContainerIsNull_WhenIWrite_ThenAnArgumentNullExceptionIsThrown()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => Target.Write(null, "blah"));
 }
Example #10
0
 public void GivenNullRepositoryContainer_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new ProgramManager(null, MockDataTableBinder));
 }
        public void GivenNullUser_WhenGrantAccess_ThenThrowException()
        {
            ManageCustomFieldPermission target = new ManageCustomFieldPermission(new Student());

            TestExtensions.ExpectException <ArgumentNullException>(() => target.GrantAccess(null));
        }
 public void GivenNullStudent_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new ManageCustomFieldPermission(null));
 }
        public void GivenNullUser_WhenGrantAccess_ThenThrowException()
        {
            CreateServiceRequestPermission target = new CreateServiceRequestPermission(Enumerable.Empty <Student>());

            TestExtensions.ExpectException <ArgumentNullException>(() => target.GrantAccess(null));
        }
 public void GivenNullStudentIds_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new CreateServiceRequestPermission(null));
 }
Example #15
0
 public void GivenNonMinuteDatePart_WhenDateDiff_ThenExceptionThrown()
 {
     TestExtensions.ExpectException <NotSupportedException>(() => RepositoryFunctions.DateDiff("", null, null));
 }
 public void GivenNullUserAuditor_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new SchoolDistrictManager(Repositories.MockRepositoryContainer, MockDataTableBinder, null));
 }
Example #17
0
        public void GivenNullType_WhenCreate_ThenThrowException()
        {
            ExportFileFactory target = new ExportFileFactory();

            TestExtensions.ExpectException <ArgumentNullException>(() => target.Create(null));
        }
Example #18
0
 public void GivenNullOtherProperty_WhenConstruct_ThenPropertyMatches()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new NumericLessThanAttribute(null));
 }
 public void GivenNullStudentList_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new ScheduleOfferingPermission(null, new ServiceOffering()));
 }
 public void GivenNullViewModel_WhenCreate_ThenAnArgumentNullExceptionIsThrown()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => Target.Create(null));
 }
 public void GivenNullServiceOffering_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentException>(() => new ScheduleOfferingPermission(Data.Students, null));
 }
Example #22
0
 public void GivenNullAssignedOffering_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new ManageAssignedOfferingPermission(null));
 }
 public void GivenNullUser_WhenCreateLoginEvent_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => Target.CreateLoginEvent(null));
 }
Example #24
0
 public void GivenNullServiceTypeManager_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new PartnersController(MockProviderLogicManager, MockProgramLogicManager, null));
 }
Example #25
0
 public void GivenNullLogicManager_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new ProgramController(null));
 }
Example #26
0
        public void GivenEmptyActivityName_WhenCreate_ThenThrowException()
        {
            PermissionFactory target = new PermissionFactory();

            TestExtensions.ExpectException<ArgumentNullException>(() => target.Create(string.Empty, new Dictionary<string, object>()));
        }
 public void GivenNullServiceOffering_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new WorksheetWriter(null, "blah"));
 }
Example #28
0
        public void GivenActivityNameOnlyWhitespace_WhenCreate_ThenThrowException()
        {
            PermissionFactory target = new PermissionFactory();

            TestExtensions.ExpectException<ArgumentNullException>(() => target.Create("\r\n \t", new Dictionary<string, object>()));
        }
        public void GivenNullUser_WhenGrantAccess_ThenThrowException()
        {
            ViewStudentDetailPermission target = new ViewStudentDetailPermission(new Student());

            TestExtensions.ExpectException <ArgumentNullException>(() => target.GrantAccess(null));
        }
 public void GivenNullDataTableBinder_WhenConstruct_ThenThrowException()
 {
     TestExtensions.ExpectException <ArgumentNullException>(() => new ServiceAttendanceManager(Repositories.MockRepositoryContainer, null));
 }