package org.jibx.schema.elements;
import org.jibx.schema.SchemaTestBase;
/**
* Test handling of simple schemas.
*/
public class EmptySchema extends SchemaTestBase
{
public static final String EMPTY_SCHEMA =
"";
public static final String EMPTY_SCHEMA_ATTRIBUTES =
"";
public static final String EMPTY_SCHEMA_PREFIX =
"";
public static final String EMPTY_SCHEMA_EXTRA_NAMESPACES =
"";
public static final String EMPTY_SCHEMA_EXTRA_ATTRIBUTE =
"";
public static final String EMPTY_SCHEMA_UNKNOWN_ATTRIBUTE =
"";
public static final String EMPTY_SCHEMA_ALL_ATTRIBUTES1 =
"";
public static final String EMPTY_SCHEMA_ALL_ATTRIBUTES2 =
"";
public static final String EMPTY_SCHEMA_UNKNOWN_VALUES =
"";
public void testEmpty() throws Exception {
runNoErrors(EMPTY_SCHEMA);
}
public void testEmptyAttributes() throws Exception {
runNoErrors(EMPTY_SCHEMA_ATTRIBUTES);
}
public void testEmptyPrefix() throws Exception {
runNoErrors(EMPTY_SCHEMA_PREFIX);
}
public void testEmptyExtraNamespaces() throws Exception {
runNoErrors(EMPTY_SCHEMA_EXTRA_NAMESPACES);
}
public void testEmptyExtraAttribute() throws Exception {
runNoErrors(EMPTY_SCHEMA_EXTRA_ATTRIBUTE);
}
public void testEmptyUnknownAttribute() throws Exception {
runOneError(EMPTY_SCHEMA_UNKNOWN_ATTRIBUTE,
"Unknown attribute not reported");
}
public void testEmptyAllAttributes1() throws Exception {
runNoErrors(EMPTY_SCHEMA_ALL_ATTRIBUTES1);
}
public void testEmptyAllAttributes2() throws Exception {
runNoErrors(EMPTY_SCHEMA_ALL_ATTRIBUTES2);
}
public void testEmptyUnknownValues() throws Exception {
runErrors(EMPTY_SCHEMA_UNKNOWN_VALUES, 4,
"Unknown attribute value not reported");
}
}