Beispiel #1
0
        /// <inheritdoc/>
        public int GetHashCode(T obj)
        {
            Ensure.NotNull(obj, nameof(obj));
            var xml = XmlSerializerAssert.ToXml(obj);

            return(xml.GetHashCode());
        }
Beispiel #2
0
        /// <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);
        }