/// <summary> /// Compares the provided object with the stored snapshot. /// </summary> /// <param name="snapshot">The object to compare with the stored snapshot</param> public static void ShouldMatchSnapshot(this object snapshot) { var snapper = SnapperFactory.GetJsonSnapper(); snapper.MatchSnapshot(snapshot); }
/// <summary> /// Compares the provided object with the stored child snapshot. /// Takes in a unique child name, best used in theory tests. /// </summary> /// <param name="snapshot">The object to compare with the stored child snapshot</param> /// <param name="childSnapshotName">The name of the child snapshot name. Must be unique per test.</param> public static void ShouldMatchChildSnapshot(this object snapshot, string childSnapshotName) { var snapper = SnapperFactory.GetJsonSnapper(); snapper.MatchSnapshot(snapshot, childSnapshotName); }