// [XmlText(Type=typeof(XmlNode))] // public XmlNode extraText; public static void AssertEquals(string id, UnknownAttributeTester exp, UnknownAttributeTester ob) { if (!AssertionHelper.AssertType(id, exp, ob)) { return; } Assertion.AssertEquals(id + " aa", exp.aa, ob.aa); if (!AssertionHelper.AssertType(id + " extraAtts", exp.extraAtts, ob.extraAtts)) { return; } int p = 0; for (int n = 0; n < ob.extraAtts.Length; n++) { XmlAttribute at = ob.extraAtts [n]; if (at.NamespaceURI == "http://www.w3.org/2000/xmlns/") { continue; } Assertion.Assert(id + " extraAtts length", p < exp.extraAtts.Length); AssertionHelper.AssertEqualsXml(id + ".extraAtts " + n, exp.extraAtts [p], ob.extraAtts[n]); p++; } }
void CheckTaArray(string id, TA[][][] exp, TA[][][] arr) { AssertionHelper.AssertType(id, exp, arr); AssertEquals(id + " Len", exp.Length, arr.Length); for (int n = 0; n < exp.Length; n++) { TA[][] tar = arr[n]; TA[][] expar = exp[n]; AssertionHelper.AssertType(id, expar, tar); AssertEquals(expar.Length, tar.Length); for (int m = 0; m < expar.Length; m++) { TA[] tar2 = tar[m]; TA[] expar2 = expar[m]; AssertionHelper.AssertType(id, expar2, tar2); AssertEquals(id, expar2.Length, tar2.Length); for (int i = 0; i < expar2.Length; i++) { TA.AssertEquals(id + "[" + n + "][" + m + "][" + i + "]", expar2[i], tar2[i]); } } } }
public static void AssertEquals(string id, TestPart expected, TestPart ob) { if (!AssertionHelper.AssertType(id, expected, ob)) { return; } Assertion.AssertEquals(id + " name", expected.name, ob.name); Assertion.AssertEquals(id + " bval", expected.bval, ob.bval); }
public static void AssertEquals(string id, TB expected, TB ob) { if (!AssertionHelper.AssertType(id, expected, ob)) { return; } Assertion.AssertEquals(id + " yy", expected.yy, ob.yy); TA.AssertEquals(id + " base", expected, ob); }
public static void AssertEquals(string id, TA expected, TA ob) { if (!AssertionHelper.AssertType(id, expected, ob)) { return; } Assertion.AssertEquals(id + " xx", expected.xx, ob.xx); // TODO: extraTextNodes }
void CheckParts(string id, TestPart[] exp, TestPart[] parts) { AssertionHelper.AssertType(id, exp, parts); AssertEquals(id + " Len", exp.Length, parts.Length); for (int n = 0; n < exp.Length; n++) { TestPart.AssertEquals(id + "[" + n + "]", exp[n], parts[n]); } }
public static void AssertEquals(string id, CustomHashtable exp, CustomHashtable ob) { if (!AssertionHelper.AssertType(id, exp, ob)) { return; } if (!AssertionHelper.AssertType(id, exp.data, ob.data)) { return; } Assertion.AssertEquals(id + " data Count", exp.data.Count, ob.data.Count); foreach (DictionaryEntry entry in exp.data) { Assertion.AssertEquals(entry.Value, ob.data[entry.Key]); } }