Example #1
0
        public async Task ValidationManagerBase_Validate_Does_Not_Throw_Exception_If_List_Is_Empty()
        {
            var testContext       = new TestContext(new TestEntity(), new TestEntity());
            var instanceUnderTest = new TestValidationManager(0);
            await instanceUnderTest.Validate(testContext);

            //nothing to assert, if it throws the error then the test fails.
        }
Example #2
0
 public async Task ValidationManagerBase_Validate_Throws_ValidationRollupException_If_Errors_Are_Added()
 {
     var testContext       = new TestContext(new TestEntity(), new TestEntity());
     var instanceUnderTest = new TestValidationManager();
     await instanceUnderTest.Validate(testContext);
 }
Example #3
0
 public async Task ValidationManagerBase_Validate_Throws_ValidationRollupException_For_Specific_Rule_Requested_To_Run()
 {
     var testContext       = new TestContext(new TestEntity(), new TestEntity());
     var instanceUnderTest = new TestValidationManager();
     await instanceUnderTest.Validate <TestRule1>(testContext);
 }
Example #4
0
 public async Task ValidationManagerBase_Validate_Throws_ArgumentOutOfRange_Exception_If_Rule_Not_Found()
 {
     var testContext       = new TestContext(new TestEntity(), new TestEntity());
     var instanceUnderTest = new TestValidationManager();
     await instanceUnderTest.Validate <TestNotRegisteredRule>(testContext);
 }