Beispiel #1
0
        public void TestEqualsNull()
        {
            var gloss = new Gloss {
                Language = Language, Def = Def
            };

            Assert.IsFalse(gloss.Equals(null));
        }
Beispiel #2
0
        public void TestEquals()
        {
            var gloss = new Gloss {
                Language = Language, Def = Def
            };

            Assert.That(gloss.Equals(new Gloss {
                Language = Language, Def = Def
            }));
        }
Beispiel #3
0
 public bool Equals(LexEtymology other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     if (!base.Equals(other))
     {
         return(false);
     }
     if (!Gloss.Equals(other.Gloss))
     {
         return(false);
     }
     if (!Comment.Equals(other.Comment))
     {
         return(false);
     }
     if (!Traits.SequenceEqual(other.Traits))
     {
         return(false);                                                 //order matters because we expose a list interface
     }
     if (!Fields.SequenceEqual(other.Fields))
     {
         return(false);                                                 //order matters because we expose a list interface
     }
     if (!Type.Equals(other.Type))
     {
         return(false);
     }
     if (!Source.Equals(other.Source))
     {
         return(false);
     }
     return(true);
 }