Skip to content

Instantly share code, notes, and snippets.

@plioi
Created January 27, 2016 15:08
Show Gist options
  • Save plioi/f96a7bb659afdd171dc5 to your computer and use it in GitHub Desktop.
Save plioi/f96a7bb659afdd171dc5 to your computer and use it in GitHub Desktop.
public static class Assertions
{
public static void ShouldMatch<T>(this T actual, T expected)
=> Json(actual).ShouldEqual(Json(expected), "Expected two objects to match on all properties.");
private static string Json<T>(T actual)
=> JsonConvert.SerializeObject(actual, Formatting.Indented);
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment