private void testgoodvalue(int n, Object value) { TypeValidator v = Validator_string.Get(n); Assert.IsTrue(v.Validate(value)); Assert.IsTrue(validateValueOk(v, value)); }
private void testelementvalidator(int n, string descr, Type expectedClass) { TypeValidator v = (TypeValidator)Validator_string.Get(n).ElementValidator(); Assert.AreEqual(n - 1, v.GetNDims()); Assert.AreSame(expectedClass, v.GetExpectedClass()); Assert.AreEqual(descr, v.ToString()); }
private void testconstructor(int n, string descr, Type expectedClass) { TypeValidator v = Validator_string.Get(n); Assert.AreEqual(n, v.GetNDims()); Assert.AreSame(expectedClass, v.GetExpectedClass()); Assert.AreEqual(descr, v.ToString()); }
public static void Init(XType type, Class2TypeMap class2type) { Field field = type.GetField(FIELD_NAME); class2type.Add(typeof(_Etch_RuntimeException), type); type.SetComponentType(typeof(_Etch_RuntimeException)); type.SetImportExportHelper(new RuntimeExceptionSerializer(type, field)); type.PutValidator(field, Validator_string.Get(0)); type.Lock(); }
public void Test_string() { Test(Validator_string.Get(2), 2, new String[][] { new String[] { "", "" }, new String[] { "", "" } }); Test(Validator_string.Get(2), 2, new String[][] { new String[] { "abc", "abc" }, new String[] { "abc", "abc" } }); }
public void constructor3() { Validator_string.Get(Validator.MAX_NDIMS + 1); }
public void constructor2() { Validator_string.Get(-1); }
public void elementvalidator2() { Validator_string.Get(0).ElementValidator(); }