public void Match <T>(Func <MatchOptions, MatchOptions>?matchOptions = null) { var content = _shouldBe.Content <T>(); var snapshotExtension = SnapshotNameExtension.Create(_extensions); var snapShooter = SnapShooter; var snapshotFullName = snapShooter.ResolveSnapshotFullName(snapshotNameExtension: snapshotExtension); _logWriter.LogMessage(""); _logWriter.LogMessage($"MATCHING AGAINST SNAPSHOT: {snapshotFullName.FolderPath}\\__snapshots__\\{snapshotFullName.Filename}"); snapShooter.AssertSnapshot(content, snapshotFullName, matchOptions); }
public void Match <T>(Func <MatchOptions, MatchOptions>?matchOptions = null) { var content = _shouldBe.Content <T>(); var snapshotExtension = SnapshotNameExtension.Create(_extensions); var snapShooter = SnapShooter; var snapshotFullName = snapShooter.ResolveSnapshotFullName(snapshotNameExtension: snapshotExtension); _logWriter.LogMessage(""); _logWriter.LogMessage($"SNAPSHOT: {GetFullSnapshotPath(snapshotFullName)}"); try { snapShooter.AssertSnapshot(content, snapshotFullName, matchOptions); } catch (BardSnapshotException) { _logWriter.LogMessage($"MISMATCH: {GetFullMismatchPath(snapshotFullName)}"); throw; } }