Skip to content

Commit da2f78c

Browse files
Minor fix to unit tests to unbreak build. Interim.
1 parent 1c810a3 commit da2f78c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

RSocket.RPC.Tests/RSocketServiceTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,15 @@ public void SupportTests()
5656
Assert.AreEqual(data, result, $"TestData did not round trip on bytes.");
5757
}
5858

59-
public class TestData : IEquatable<TestData>
59+
public class TestData
6060
{
6161
public Guid Id = Guid.NewGuid();
6262
public TestData() { }
6363
public TestData(ReadOnlySequence<byte> from) { Id = new Guid(from.ToArray()); }
6464
public static implicit operator ReadOnlySequence<byte>(TestData from) => new ReadOnlySequence<byte>(from.Id.ToByteArray());
6565
public override string ToString() => nameof(TestData) + Id.ToString();
66-
public bool Equals(TestData other) => this.ToString().Equals(other.ToString());
66+
public override int GetHashCode() => HashCode.Combine(Id);
67+
public override bool Equals(object obj) => (obj is TestData other) && this.Id == other.Id;
6768
}
6869

6970
[TestInitialize]

0 commit comments

Comments
 (0)