/// <inheritdoc/> public int GetHashCode(T obj) { Ensure.NotNull(obj, nameof(obj)); var xml = XmlSerializerAssert.ToXml(obj); return(xml.GetHashCode()); }
/// <inheritdoc/> public bool Equals(T x, T y) { if (x == null && y == null) { return(true); } if (x == null || y == null) { return(false); } var xXml = XmlSerializerAssert.ToXml(x); var yXml = XmlSerializerAssert.ToXml(y); return(xXml == yXml); }