public void TestValidEmailMultiple() { ValidEmailMultiple emailSettings = new ValidEmailMultiple(); ValidEmailMultiple validEmail = ValidateSettings <ValidEmailMultiple> .Validate(emailSettings); Assert.IsTrue(validEmail.Email == "[email protected];[email protected]"); }
public void TestValidEmailSingle() { ValidEmail emailSettings = new ValidEmail(); ValidEmail validEmail = ValidateSettings <ValidEmail> .Validate(emailSettings); Assert.IsTrue(validEmail.Email == "*****@*****.**"); }
public void ValidDefault() { DefaultTestString test = new DefaultTestString(); test = ValidateSettings <DefaultTestString> .Validate(test); Assert.AreEqual(test.Value, "hello"); }
public void ValidateDefaultIntWithRange() { DefaultIntZeroWithinRange test = new DefaultIntZeroWithinRange(); test = ValidateSettings <DefaultIntZeroWithinRange> .Validate(test); Assert.AreEqual(0, test.Value); }
public void TestValidOptional1() { ValidEmail emailSettings = new ValidEmail(); emailSettings = ValidateSettings <ValidEmail> .Validate(emailSettings); Assert.IsTrue(String.IsNullOrEmpty(emailSettings.Email)); }
public void ValidDefaultAppPath() { DefaultTestStringAppPath test = new DefaultTestStringAppPath(); test = ValidateSettings <DefaultTestStringAppPath> .Validate(test); Assert.IsTrue(test.Value.EndsWith("AppSettings\\Test\\bin\\Debug\\net5.0")); }
public void ValidDefaultSpecialFolder() { DefaultTestStringSpecialFolder test = new DefaultTestStringSpecialFolder(); test = ValidateSettings <DefaultTestStringSpecialFolder> .Validate(test); Assert.AreEqual(test.Value, "C:\\Users\\Public\\Music"); }
public void RegexValidTest() { RegexTest test = new RegexTest() { Example = "Abbnn9@M8" }; test = ValidateSettings <RegexTest> .Validate(test); }
public void RangeIntInvalid() { RangeInt range = new RangeInt() { Value = 0 }; range = ValidateSettings <RangeInt> .Validate(range); }
public void InvalidResponse1() { ResponseServerError response = new ResponseServerError { ResponseCode = 404 }; response = ValidateSettings <ResponseServerError> .Validate(response); }
public void InvalidDelimitedString() { DelimitedInvalid delimited = new DelimitedInvalid() { Test = "one;two;three;four;five;six;seven" }; delimited = ValidateSettings <DelimitedInvalid> .Validate(delimited); }
public void ValidDelimitedStringTooMany() { Delimited delimited = new Delimited() { Test = "one#two#three#four#five#six#seven" }; delimited = ValidateSettings <Delimited> .Validate(delimited); }
public void InvalidResponse3() { ResponseServerCustom response = new ResponseServerCustom { ResponseCode = 502 }; response = ValidateSettings <ResponseServerCustom> .Validate(response); }
public void PathInvalid() { PathExistValid pathExist = new PathExistValid() { Path = "C:\\wintwirk" }; pathExist = ValidateSettings <PathExistValid> .Validate(pathExist); }
public void ValidUriEndpoint() { UriEndpointTest test = new UriEndpointTest() { Value = "http://www.google.com" }; test = ValidateSettings <UriEndpointTest> .Validate(test); }
public void InvalidUri() { UriTest test = new UriTest() { Value = "not a / uri.com" }; test = ValidateSettings <UriTest> .Validate(test); }
public void ValidStringLength() { StringTestNotNullLength test = new StringTestNotNullLength() { Value = "testing" }; test = ValidateSettings <StringTestNotNullLength> .Validate(test); }
public void NullStringInvalid() { StringTestNotNull test = new StringTestNotNull() { Value = null }; test = ValidateSettings <StringTestNotNull> .Validate(test); }
public void ValidResponse4() { ResponseServerError response = new ResponseServerError { ResponseCode = 500 }; response = ValidateSettings <ResponseServerError> .Validate(response); }
public void ValidResponse3() { ResponseClientError response = new ResponseClientError { ResponseCode = 404 }; response = ValidateSettings <ResponseClientError> .Validate(response); }
public void ValidResponse8() { ResponseServerCustom response = new ResponseServerCustom { ResponseCode = 999 }; response = ValidateSettings <ResponseServerCustom> .Validate(response); }
public void RegexInvalidTest() { RegexTest test = new RegexTest() { Example = "asdfsadfasdfbbnn9@m8" }; test = ValidateSettings <RegexTest> .Validate(test); }
public void PathValidTrue() { PathExistValid pathExistValid = new PathExistValid() { Path = "C:\\windows" }; pathExistValid = ValidateSettings <PathExistValid> .Validate(pathExistValid); }
public void ValidDelimitedStringTooFew() { Delimited delimited = new Delimited() { Test = "one" }; delimited = ValidateSettings <Delimited> .Validate(delimited); }
public void InvalidNVP2() { NameValuePairInvalid nameValuePair = new NameValuePairInvalid() { Setting = "one=two;two=three;three=four" }; nameValuePair = ValidateSettings <NameValuePairInvalid> .Validate(nameValuePair); }
public void InvalidResponse2() { ResponseClientError response = new ResponseClientError { ResponseCode = 200 }; response = ValidateSettings <ResponseClientError> .Validate(response); }
public void ValidPartialUri() { UriRelativeTest test = new UriRelativeTest() { Value = "/Help" }; test = ValidateSettings <UriRelativeTest> .Validate(test); }
public void TestInvalidOptional1() { ValidEmail emailSettings = new ValidEmail() { Email = "mehere.com" }; emailSettings = ValidateSettings <ValidEmail> .Validate(emailSettings); }
public void InvalidUriEndpoint() { UriEndpointTest test = new UriEndpointTest() { Value = "http://www.thereshouldbenodomainhere.com" }; test = ValidateSettings <UriEndpointTest> .Validate(test); }
public void ValidDelimitedString() { Delimited delimited = new Delimited() { Test = "one#two#three" }; delimited = ValidateSettings <Delimited> .Validate(delimited); }