Beispiel #1
0
        public bool Equals(TestRootObject other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (!MatchLeafNodes(other))
            {
                return(false);
            }

            return(AreStartDatesEqual(other) &&
                   other.Id.Equals(Id) &&
                   Equals(other.Titles.Length, Titles.Length) &&
                   Equals(other.Friend, Friend));
        }
Beispiel #2
0
 private bool AreStartDatesEqual(TestRootObject otherRootObject)
 {
     return(otherRootObject.CreatedDate.Year.Equals(CreatedDate.Year));
 }
Beispiel #3
0
 private bool MatchLeafNodes(TestRootObject other)
 {
     return(other.Leaves.Count == Leaves.Count);
 }