function validate(assert, sTypeName, oConstraints, sExpectedErrorKey) {
		var oType = createInstance(sTypeName, oConstraints);

		oType.validateValue(null);

		oConstraints.nullable = false;
		oType = createInstance(sTypeName, oConstraints);
		validateError(assert, oType, null, sExpectedErrorKey, "nullable");

		try {
			oType.validateValue("foo");
			assert.ok(false);
		} catch (e) {
			assert.ok(e instanceof ValidateException);
			assert.strictEqual(e.message, "Illegal " + sTypeName + " value: foo");
		}
		oType.validateValue(new Date());
	}
/*
	 * Tests the validation for a DateTime with the given constraints.
	 */
Tests the validation for a DateTime with the given constraints.
Tests the validation for a DateTime with the given constraints .
function validate(assert, sTypeName, oConstraints, sExpectedErrorKey) {
		var oType = createInstance(sTypeName, oConstraints);
		oType.validateValue(null);
		oConstraints.nullable = false;
		oType = createInstance(sTypeName, oConstraints);
		validateError(assert, oType, null, sExpectedErrorKey, "nullable");
		try {
			oType.validateValue("foo");
			assert.ok(false);
		} catch (e) {
			assert.ok(e instanceof ValidateException);
			assert.strictEqual(e.message, "Illegal " + sTypeName + " value: foo");
		}
		oType.validateValue(new Date());
	}
function validate ( assert , sTypeName , oConstraints , sExpectedErrorKey ) { var oType = createInstance ( sTypeName , oConstraints ) ; oType . validateValue ( null ) ; oConstraints . nullable = false ; oType = createInstance ( sTypeName , oConstraints ) ; validateError ( assert , oType , null , sExpectedErrorKey , "nullable" ) ; try { oType . validateValue ( "foo" ) ; assert . ok ( false ) ; } catch ( e ) { assert . ok ( e instanceof ValidateException ) ; assert . strictEqual ( e . message , "Illegal " + sTypeName + " value: foo" ) ; } oType . validateValue ( new Date ( ) ) ; }
Tests the validation for a DateTime with the given constraints.
Tests the validation for a DateTime with the given constraints .