Skip to content

Idea (NUnit, XUnit migration) #198

@amirrajan

Description

@amirrajan

Would be cool if you could do:

//somwhere inside of a custom Program.cs that references both NUnit and NSpec

var builder = nspecThingy.TestFinder(someAssembly, (methodInfo) => 
{
    if (nspecThingy.ContainsAttribute<Setup>(methodInfo))
    {
	return nspecThingy.Before();
    }
    
    if (nspecThingy.ContainsAttribute<TestMethod>(methodInfo))
    {
	return nspecThingy.Context("NUnit Method: " + methodInfo.Name);
    }
    
    if (nspecThingy.ContainsAttribute<TearDown>(methodInfo))
    {
	return nspecThingy.After();
    }
    
    return nspecThingy.Skip();
});

specRunner.run(builder, builder2, builder3);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions