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)); }
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)); }
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(Dungeon other) { return(!ReferenceEquals(null, other) && Serial.Equals(other.Serial)); }
public bool Equals(PvPBattle other) { return(!ReferenceEquals(null, other) && (ReferenceEquals(this, other) || Serial.Equals(other.Serial))); }