상속: ConfigurationValidatorBase
예제 #1
0
		public void CanValidate ()
		{
			TimeSpan t = new TimeSpan (1000);
			TimeSpanValidator v = new TimeSpanValidator (t, t);

			Assert.IsTrue (v.CanValidate (typeof (TimeSpan)), "A1");
			Assert.IsFalse (v.CanValidate (typeof (int)), "A2");
			Assert.IsFalse (v.CanValidate (typeof (long)), "A3");
		}
예제 #2
0
		public void Validate_Resolution ()
		{
			TimeSpanValidator v = new TimeSpanValidator (new TimeSpan (20000),
								     new TimeSpan (50000),
								     false,
								     2);

			v.Validate (TimeSpan.FromTicks (40000));
		}
예제 #3
0
		public void Validate_Exclusive_fail3 ()
		{
			TimeSpanValidator v = new TimeSpanValidator (new TimeSpan (5000), new TimeSpan (10000), true);
			v.Validate (new TimeSpan (7000));
		}
예제 #4
0
		public void Validate_Inclusive ()
		{
			TimeSpanValidator v = new TimeSpanValidator (new TimeSpan (5000), new TimeSpan (10000), false);
			v.Validate (new TimeSpan (5000));
			v.Validate (new TimeSpan (10000));
		}
예제 #5
0
		public void Validate_inRange ()
		{
			TimeSpanValidator v = new TimeSpanValidator (new TimeSpan (5000), new TimeSpan (10000));
			v.Validate (new TimeSpan (7000));
		}