Example #1
0
 public bool Equals(MockResponse other)
 {
     return(other != null &&
            Status == other.Status &&
            Body.Equals(other.Body) &&
            this.Headers.Count == other.Headers.Count && !Headers.Except(other.Headers).Any() &&
            this.Queries.Count == other.Queries.Count && !Queries.Except(other.Queries).Any() &&
            this.Type == other.Type);
 }
Example #2
0
        public bool Equals(Message other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(other.Payload.SequenceEqual(Payload) &&
                   Headers.Count == other.Headers.Count &&
                   !Headers.Except(other.Headers).Any());
        }