public bool Equals(Laptop other)
 {
     if (other == null || other.Serial == null)
     {
         return(false);
     }
     return(Serial.Equals(other.Serial));
 }
 /// <summary>
 /// Two DnsResourceDataStartOfAuthority are equal iff their main name server, responsible mailbox, serial, refresh, retry, expire
 /// and minimum TTL fields are equal.
 /// </summary>
 public bool Equals(DnsResourceDataStartOfAuthority other)
 {
     return(other != null &&
            MainNameServer.Equals(other.MainNameServer) &&
            ResponsibleMailbox.Equals(other.ResponsibleMailbox) &&
            Serial.Equals(other.Serial) &&
            Refresh.Equals(other.Refresh) &&
            Retry.Equals(other.Retry) &&
            Expire.Equals(other.Expire) &&
            MinimumTtl.Equals(other.MinimumTtl));
 }
Пример #3
0
        public void EqualsTest()
        {
            Serial target   = new Serial(); // TODO: 初始化为适当的值
            object xObject  = null;         // TODO: 初始化为适当的值
            bool   expected = false;        // TODO: 初始化为适当的值
            bool   actual;

            actual = target.Equals(xObject);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("验证此测试方法的正确性。");
        }
    public bool Equals(Roles other)
    {
        //Check whether the compared object is null.
        if (Object.ReferenceEquals(other, null))
        {
            return(false);
        }

        //Check whether the compared object references the same data.
        if (Object.ReferenceEquals(this, other))
        {
            return(true);
        }

        //Check whether the products' properties are equal.
        return(Serial.Equals(other.Serial) && Name.Equals(other.Name));
    }
Пример #5
0
 public void EqualsTest()
 {
     Serial target = new Serial(); // TODO: 初始化为适当的值
     object xObject = null; // TODO: 初始化为适当的值
     bool expected = false; // TODO: 初始化为适当的值
     bool actual;
     actual = target.Equals( xObject );
     Assert.AreEqual( expected, actual );
     Assert.Inconclusive( "验证此测试方法的正确性。" );
 }
Пример #6
0
 public bool Equals(Dungeon other)
 {
     return(!ReferenceEquals(null, other) && Serial.Equals(other.Serial));
 }
Пример #7
0
 public bool Equals(PvPBattle other)
 {
     return(!ReferenceEquals(null, other) && (ReferenceEquals(this, other) || Serial.Equals(other.Serial)));
 }