" \"com.linkedin.Cat\" : { \"c\" : 1 }\n" +
" }\n" +
" }\n" +
"}",
false,
new ValidationOptions(RequiredMode.IGNORE, CoercionMode.NORMAL),
ResultFlag.VALID,
ResultFlag.HAS_FIX,
ResultFlag.NOT_HAS_FIXUP_READONLY_ERROR,
new String[] { },
},
{
ANYRECORDCLIENT_SCHEMA,
"{" +
" \"required\" : {\n" +
" \"com.linkedin.data.schema.validator.AnyRecord\" : {\n" +
" \"com.linkedin.Cat\" : { \"c\" : 1 }\n" +
" }\n" +
" }\n" +
"}",
true,
new ValidationOptions(RequiredMode.IGNORE, CoercionMode.NORMAL),
ResultFlag.NOT_VALID,
ResultFlag.HAS_FIX,
ResultFlag.HAS_FIXUP_READONLY_ERROR,
new String[] { "ERROR", "/required/com.linkedin.data.schema.validator.AnyRecord/com.linkedin.Cat/c", "cannot be fixed because DataMap backing com.linkedin.Cat type is read-only" },
}
};
final boolean debug = false;
final AnyRecordValidator.Parameter anyRecordValidatorParameter = new AnyRecordValidator.Parameter(true, _resolver);
for (Object[] row : inputs)
{
int i = 0;
DataSchema schema = (DataSchema) row[i++];
DataMap object = TestUtil.dataMapFromString((String) row[i++]);
boolean makeReadOnly = (Boolean) row[i++];
ValidationOptions options = (ValidationOptions) row[i++];
if (makeReadOnly)
{
object.makeReadOnly();
}