public Distinctions Compare <T>(T expected, T actual, string propertyName) { var a = expected.ChangeType <Course>(); var b = actual.ChangeType <Course>(); return (Distinctions .CreateFor <string>(propertyName, a.Name, b.Name).WhenNot((x, y) => x == y)); }
public Distinctions Compare <T>(string propertyName, T expected, T actual) => Distinctions .CreateFor <T>(propertyName, expected, actual).WhenNot((a, b) => a.Equals(b));