Skip to content

Instantly share code, notes, and snippets.

@Vidarls
Vidarls / StackTraceParsers.cs
Created August 17, 2011 06:51
Xunit support for approval tests
namespace ApprovalTests.StackTraceParsers
{
public class StackTraceParser : IStackTraceParser
{
private static IStackTraceParser[] parsers;
private IStackTraceParser parser;
public bool Parse(StackTrace stackTrace)
{
@Vidarls
Vidarls / Approvals.cs
Created August 1, 2011 06:07
Provisional extension points to modify namer and reporter at runtime.
public class Approvals
{
//Default implementation works as before
static Func<IApprovalNamer> _defaultNamerSource = (()=> new UnitTestFrameworkNamer());
//Extension point to allow injection of new default namer
//at runtime, as vb6 does not support attributes, nor stacktraces.
public static Func<IApprovalNamer> DefaultNamerSource
{
private get { return _defaultNamerSource; }