/// <summary> /// Calculates a hash code for the seuqence /// </summary> /// <returns></returns> public override int GetHashCode() { var hash = 17; hash = hash * 23 + SequenceId.GetHashCode(); hash = hash * 23 + MsnFeatureId.GetHashCode(); hash = hash * 23 + DatasetId.GetHashCode(); return(hash); }
internal void EqualsTest(SequenceId sequenceId1, object obj, bool expected) { if (obj is SequenceId sequenceId2) { sequenceId1.Equals(sequenceId2).Should().Be(expected); (sequenceId1 == sequenceId2).Should().Be(expected); (sequenceId1 != sequenceId2).Should().Be(!expected); sequenceId1.GetHashCode().Equals(sequenceId2.GetHashCode()).Should().Be(expected); } sequenceId1.Equals(obj).Should().Be(expected); }