public void ShouldBeEqual() { Instant first = new Instant(); Instant second = new Instant(first.ToDateTime()); Expect.IsTrue(first.Equals(second)); }
public void IEquatableEquals_WithEqualTicks_IsTrue() { var first = new Instant(100L); var second = new Instant(100L); Assert.True(first.Equals(second), "100 == 100 (different objects)"); }
public override bool Equals(Object obj) { if (obj is FixedClock) { FixedClock other = (FixedClock)obj; return(Instant_Renamed.Equals(other.Instant_Renamed) && Zone_Renamed.Equals(other.Zone_Renamed)); } return(false); }
/// <summary> /// Indicates whether the current object is equal to another object of the same type. /// </summary> /// <param name="other">An object to compare with this object.</param> /// <returns> /// true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false. /// </returns> public virtual bool Equals(OneOffSchedule other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(_options == other._options && Instant.Equals(other.Instant) && string.Equals(_name, other._name)); }
public bool Equals(ReturnFlightArchive other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Instant.Equals(other.Instant) && Equals(ReturnFlight, other.ReturnFlight)); }
public override bool Equals(object other) { if (this == other) { return(true); } if (!(other is ContainerConfiguration otherContainerConfiguration)) { return(false); } return(creationTime.Equals(otherContainerConfiguration.creationTime) && Equals(entrypoint, otherContainerConfiguration.entrypoint) && Equals(programArguments, otherContainerConfiguration.programArguments) && Equals(environmentMap, otherContainerConfiguration.environmentMap) && Equals(exposedPorts, otherContainerConfiguration.exposedPorts) && Equals(labels, otherContainerConfiguration.labels) && Equals(user, otherContainerConfiguration.user) && Equals(workingDirectory, otherContainerConfiguration.workingDirectory)); }
public bool Equals(Period other) => other != null && Instant.Equals(other.Instant) && StartDate.Equals(other.StartDate) && EndDate.Equals(other.EndDate);
public bool Equals(Period other) { return(other != null && Instant.Equals(other.Instant)); }