Inheritance: ConfigurationValidatorBase
Ejemplo n.º 1
0
		public void TestSuccess ()
		{
			hit_success = false;
			CallbackValidator v = new CallbackValidator (typeof (int), success);
			v.Validate (5);

			Assert.IsTrue (hit_success, "A1");
		}
Ejemplo n.º 2
0
		public void CanValidate ()
		{
			CallbackValidator v = new CallbackValidator (typeof (int), success);

			Assert.IsFalse (v.CanValidate (typeof (string)));
			Assert.IsTrue (v.CanValidate (typeof (int)));
			Assert.IsFalse (v.CanValidate (typeof (object)));
		}
Ejemplo n.º 3
0
		public void TestFailure2 ()
		{
			hit_failure = false;
			CallbackValidator v = new CallbackValidator (typeof (int), failure);
			try {
				v.Validate (5);
			}
			catch { }
			finally {
				Assert.IsTrue (hit_failure, "A1");
			}
		}
Ejemplo n.º 4
0
		public void TestFailure1 ()
		{
			CallbackValidator v = new CallbackValidator (typeof (int), failure);
			v.Validate (5);
		}
Ejemplo n.º 5
0
		public void NullType ()
		{
			CallbackValidator v = new CallbackValidator (null, success);
		}
Ejemplo n.º 6
0
		public void NullCallback ()
		{
			CallbackValidator v = new CallbackValidator (typeof (int), null);
		}