public void EqualsT() { var tp1 = new TimePoint(100); var tp2 = new TimePoint(100); var tp3 = new TimePoint(200); Assert.True(tp1.Equals(tp1)); Assert.True(tp1.Equals(tp2)); Assert.True(tp2.Equals(tp1)); Assert.True(!tp1.Equals(tp3)); Assert.True(!tp3.Equals(tp1)); }
public void EqualsObject() { var tp1 = new TimePoint(100); var tp2 = new TimePoint(100); var tp3 = new TimePoint(200); Assert.True(tp1.Equals((object)tp1)); Assert.True(tp1.Equals((object)tp2)); Assert.True(tp2.Equals((object)tp1)); Assert.True(!tp1.Equals((object)tp3)); Assert.True(!tp3.Equals((object)tp1)); Assert.True(!tp1.Equals((object)null)); Assert.True(!tp1.Equals((object)100)); }
public bool CheckDirty(MsDataFileData other) { return(!string.Equals(Name, other.Name) || !string.Equals(Label, other.Label) || !string.Equals(Cohort, other.Cohort) || !string.Equals(Sample, other.Sample) || !PrecursorPool.Equals(other.PrecursorPool) || !TimePoint.Equals(other.TimePoint)); }
public void Equality() { TimePoint zeroA = default; TimePoint zeroB = new TimePoint(0); TimePoint oneA = new TimePoint(1); TimePoint oneB = new TimePoint(1); zeroA.Equals(zeroB).Should().BeTrue(); oneA.Equals(zeroB).Should().BeFalse(); oneB.Equals(oneA).Should().BeTrue(); }