void ValuesGreaterThan() { var left = new { Value1 = 1, Value2 = 2 }; var right = new { Value1 = 1, Value2 = 0 }; var compare = Cmp.Values(left, right).Check(x => x.Value1).Check(x => x.Value2); Expect((int)compare).Is(1); }
void ValuesEqual() { var left = new { Value1 = 1, Value2 = 2 }; var right = new { Value1 = 1, Value2 = 2 }; var compare = Cmp.Values(left, right).Check(x => x.Value1).Check(x => x.Value2); Expect((int)compare).Is(0); }
void ValueGreaterThan() { var left = new { Value = 2 }; var right = new { Value = 1 }; var compare = Cmp.Values(left, right).Check(x => x.Value); Expect((int)compare).Is(1); }
void ValueEqual() { var left = new { Value = 1 }; var right = new { Value = 1 }; var compare = Cmp.Values(left, right).Check(x => x.Value); Expect((int)compare).Is(0); }
void NoValues() { ExpectThrows <InvalidOperationException>(() => (int)Cmp.Values(1, 1)); }
public int CompareTo(Id other) => Cmp.Values(this, other).Check(x => x.ToString());