Methods Summary |
---|
private void | runFailTest(java.lang.String value)Run a failure test. value should be invalid.
NormalizedString oNormalizedString = null;
try {
oNormalizedString = new NormalizedString(value);
}
catch (Exception e) { // catch the validation exception
}
// object is not iNstantiated on bad data value
assertNull("validation restriction failed [" +
value + "]. did not restrict bad value.", oNormalizedString);
|
private void | runPassTest(java.lang.String value)Run a successful test. value should be valid.
NormalizedString oNormalizedString = null;
try {
oNormalizedString = new NormalizedString(value);
}
catch (Exception e) { // catch the validation exception
}
assertEquals("normalized string not equal" +
value, oNormalizedString.toString(), value);
|
public void | testNsCarriageReturn()Test that "this has \r carriage return" fails.
runFailTest("this has \r carriage return");
|
public void | testNsDoubleSpace()
runPassTest("a B"); // note: \r fails
|
public void | testNsLineFeed()Test that "this has \n line feed" fails.
runFailTest("this has \n line feed");
|
public void | testNsSimpleString()Test that "a simple string" succeeds.
runPassTest("a simple string");
|
public void | testNsStringWithLeadingAndTrailingSpaces()
runPassTest(" centered ");
|
public void | testNsStringWithLeadingSpaces()differentiate from xsd:token
runPassTest(" a failure case");
|
public void | testNsStringWithTabs()Test that "this has \t a tab" fails.
runFailTest("this has \t a tab");
|
public void | testNsStringWithTrailingSpaces()
runPassTest("this is a ");
|