public void core0007T()
{
string computedValue = "";
System.Xml.XmlText oldTextNode = null;
System.Xml.XmlText newTextNode = null;
System.Xml.XmlNode testNode = null;
string expectedValue = "System.ArgumentOutOfRangeException";//util.INDEX_SIZE_ERR;
testResults results = new testResults("Core0007T");
try
{
results.description = "The \"splitText(offset)\" method raises an " +
"INDEX_SIZE_ERR Exception if the specified " +
"offset is negative.";
//
// Retrieve the targeted data
//
testNode = util.nodeObject(util.THIRD, util.SECOND);
oldTextNode = (System.Xml.XmlText)testNode.FirstChild;
//
// Call the "spitText(offset)" method with "offset" equal to a negative
// number should raise an exception.
//
try
{
oldTextNode.SplitText(-69);
}
catch (System.Exception ex)
{
computedValue = ex.GetType().FullName;
}
}
catch (System.Exception ex)
{
computedValue = "Exception " + ex.Message;
}
results.expected = expectedValue;
results.actual = computedValue;
util.resetData();
Assert.AreEqual(results.expected, results.actual);
}