Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 071da8f

Browse files
committed
CopyFrom should check equality, not specific properties
1 parent b3c65f6 commit 071da8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GitHub.App/Models/PullRequestModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public PullRequestModel(int number, string title, IAccount author, DateTimeOffse
1919

2020
public void CopyFrom(IPullRequestModel other)
2121
{
22-
if (Number != other.Number)
23-
throw new ArgumentException("Instance to copy from must match", nameof(other));
22+
if (!Equals(other))
23+
throw new ArgumentException("Instance to copy from doesn't match this instance. this:(" + this + ") other:(" + other + ")", nameof(other));
2424
Title = other.Title;
2525
UpdatedAt = other.UpdatedAt;
2626
CommentCount = other.CommentCount;

0 commit comments

Comments
 (0)