public override bool Equals(object obj) { bool result = false; if (obj is ConsoleTelemetry) { ConsoleTelemetry other = (ConsoleTelemetry)obj; result = Id.Equals(other.Id) && Temperature.Equals(other.Temperature) && Humidity.Equals(other.Humidity) && Timestamp.Equals(other.Timestamp); } return(result); }
protected bool Equals(ForecastEntity other) { return(Id == other.Id && string.Equals(City, other.City) && Date.Equals(other.Date) && Pressure.Equals(other.Pressure) && Humidity.Equals(other.Humidity) && TemperatureMorning.Equals(other.TemperatureMorning) && TemperatureDay.Equals(other.TemperatureDay) && TemperatureEvening.Equals(other.TemperatureEvening) && TemperatureNight.Equals(other.TemperatureNight) && WindSpeed.Equals(other.WindSpeed) && string.Equals(Description, other.Description) && string.Equals(Icon, other.Icon)); }
/// <summary> /// Returns true if Forecast instances are equal /// </summary> /// <param name="other">Instance of Forecast to be compared</param> /// <returns>Boolean</returns> public bool Equals(Forecast other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Date == other.Date || Date != null && Date.Equals(other.Date) ) && ( Pressure == other.Pressure || Pressure != null && Pressure.Equals(other.Pressure) ) && ( Humidity == other.Humidity || Humidity != null && Humidity.Equals(other.Humidity) ) && ( WindSpeed == other.WindSpeed || WindSpeed != null && WindSpeed.Equals(other.WindSpeed) ) && ( Clouds == other.Clouds || Clouds != null && Clouds.Equals(other.Clouds) ) && ( Temperature == other.Temperature || Temperature != null && Temperature.Equals(other.Temperature) ) && ( Weather == other.Weather || Weather != null && Weather.Equals(other.Weather) )); }
protected bool Equals(MainValues other) { return(Temp.Equals(other.Temp) && TempMin.Equals(other.TempMin) && TempMax.Equals(other.TempMax) && Pressure.Equals(other.Pressure) && SeaLevel.Equals(other.SeaLevel) && GroundLevel.Equals(other.GroundLevel) && Humidity.Equals(other.Humidity)); }
public void EqualsReturnsFalseOnNull() { Humidity percent = Humidity.FromPercents(1); Assert.False(percent.Equals(null)); }
public void EqualsReturnsFalseOnTypeMismatch() { Humidity percent = Humidity.FromPercents(1); Assert.False(percent.Equals(new object())); }