Skip to content

Commit

Permalink
Update TestEquate.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
xafero committed Apr 10, 2024
1 parent 5526e92 commit 64e3647
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions src/Coaster.Tests/res/TestEquate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,57 @@ public ToDoS(string desc, bool isDone)
public static bool operator ==(ToDoS left, ToDoS right) => left.Equals(right);
public static bool operator !=(ToDoS left, ToDoS right) => !(left == right);
}

public class ToDoC
{
private readonly string _desc;
private readonly bool _isDone;
public ToDoC(string description, bool isDone)
{
_desc = description;
_isDone = isDone;
}

protected virtual Type EqualityContract
{
get
{
return typeof(ToDoC);
}
}

public string Description
{
get
{
return _desc;
}

init
{
_desc = value;
}
}

public bool IsDone
{
get
{
return _isDone;
}

init
{
_isDone = value;
}
}

public void Deconstruct(out string description, out bool isDone)
{
description = Description;
isDone = IsDone;
}

public override string ToString() => $"{Description}|{IsDone}";
}
}

0 comments on commit 64e3647

Please sign in to comment.