public void CheckRegularExpressionTest1() { // RegexField is null RibbonDefinition obj = new ValidationHelperTester(); ValidationHelper.Current.CheckRegularExpression(obj, "RegexField", "[A-Za-z]+"); Assert.Fail("Expected ValidationException was not thrown!"); }
public void CheckIntRangeTest1() { // RangeField is null RibbonDefinition obj = new ValidationHelperTester(); ValidationHelper.Current.CheckIntRange(obj, "RangeField", 1, 9); Assert.Fail("Expected ValidationException was not thrown!"); }
public void CheckRequiredTest1() { // RequiredField is null RibbonDefinition obj = new ValidationHelperTester(); ValidationHelper.Current.CheckNotNull(obj, "RequiredField"); Assert.Fail("Expected ValidationException was not thrown!"); }
public void CheckArrayTest1() { // ArrayField is null RibbonDefinition obj = new ValidationHelperTester(); ValidationHelper.Current.CheckArrayHasElements(obj, "ArrayField"); Assert.Fail("Expected ValidationException was not thrown!"); }
public void CheckIntRangeTest3() { // RangeField is in range RibbonDefinition obj = new ValidationHelperTester() { RangeField = 5 }; ValidationHelper.Current.CheckIntRange(obj, "RangeField", 1, 9); }
public void CheckRequiredTest2() { // RequiredField is not null RibbonDefinition obj = new ValidationHelperTester() { RequiredField = String.Empty }; ValidationHelper.Current.CheckNotNull(obj, "RequiredField"); }
public void CheckArrayTest3() { // ArrayField filled properly RibbonDefinition obj = new ValidationHelperTester() { ArrayField = new TabDefinition[] { new TabDefinition() } }; ValidationHelper.Current.CheckArrayHasElements(obj, "ArrayField"); }
public void CheckRegularExpressionTest4() { // RegexField is null RibbonDefinition obj = new ValidationHelperTester() { RegexField = "Good Test" }; ValidationHelper.Current.CheckRegularExpression(obj, "RegexField", "[A-Za-z]+"); }
public void CheckIntRangeTest1() { ValidationHelper_Accessor target = new ValidationHelper_Accessor(); // RangeField is null RibbonDefinition obj = new ValidationHelperTester(); target.CheckIntRange(obj, "RangeField", 1, 9); Assert.Fail("Expected ValidationException was not thrown!"); }
public void CheckRequiredTest1() { ValidationHelper_Accessor target = new ValidationHelper_Accessor(); // RequiredField is null RibbonDefinition obj = new ValidationHelperTester(); target.CheckNotNull(obj, "RequiredField"); Assert.Fail("Expected ValidationException was not thrown!"); }
public void CheckIntRangeTest3() { ValidationHelper_Accessor target = new ValidationHelper_Accessor(); // RangeField is in range RibbonDefinition obj = new ValidationHelperTester() { RangeField = 5 }; target.CheckIntRange(obj, "RangeField", 1, 9); }
public void CheckArrayTest3() { ValidationHelper_Accessor target = new ValidationHelper_Accessor(); // ArrayField filled properly RibbonDefinition obj = new ValidationHelperTester() { ArrayField = new TabDefinition[] { new TabDefinition() } }; target.CheckArrayHasElements(obj, "ArrayField"); }
public void CheckRegularExpressionTest4() { ValidationHelper_Accessor target = new ValidationHelper_Accessor(); // RegexField is null RibbonDefinition obj = new ValidationHelperTester() { RegexField = "Good Test" }; target.CheckRegularExpression(obj, "RegexField", "[A-Za-z]+"); }
public void CheckRequiredTest2() { ValidationHelper_Accessor target = new ValidationHelper_Accessor(); // RequiredField is not null RibbonDefinition obj = new ValidationHelperTester() { RequiredField = String.Empty }; target.CheckNotNull(obj, "RequiredField"); }
public void CheckIntRangeTest2() { // RangeField is outside of the range RibbonDefinition obj = new ValidationHelperTester() { RangeField = -1 }; ValidationHelper.Current.CheckIntRange(obj, "RangeField", 1, 9); Assert.Fail("Expected ValidationException was not thrown!"); }
public void CheckArrayTest2() { // ArrayField is empty array RibbonDefinition obj = new ValidationHelperTester() { ArrayField = new TabDefinition[] { } }; ValidationHelper.Current.CheckArrayHasElements(obj, "ArrayField"); Assert.Fail("Expected ValidationException was not thrown!"); }
public void CheckRegularExpressionTest2() { // RegexField has invalid characters RibbonDefinition obj = new ValidationHelperTester() { RegexField = "Bad.Test" }; ValidationHelper.Current.CheckRegularExpression(obj, "RegexField", "[A-Za-z]+"); Assert.Fail("Expected ValidationException was not thrown!"); }