public virtual void before_each() { autoSubstitute = new AutoSubstitute(); mapper = autoSubstitute.Resolve <TestCaseMapper>(); discoveredExample = new DiscoveredExample() { FullName = "nspec. L1 context. L2 context. example name.", SourceFilePath = @".\some\path\to\source\code.cs", SourceLineNumber = 123, SourceAssembly = @".\some\path\to\library.dll", Tags = new string[] { "tag1", "tag2", "tag3_with_underscore", "tag4-with-dash", }, }; expectedTestCase = new TestCase( discoveredExample.FullName, Constants.ExecutorUri, discoveredExample.SourceAssembly) { DisplayName = "L1 context › L2 context › example name.", CodeFilePath = discoveredExample.SourceFilePath, LineNumber = discoveredExample.SourceLineNumber, }; var expectedTraits = new string[] { "tag1", "tag2", "tag3 with underscore", "tag4-with-dash", } .Select(tag => new Trait(tag, null)); expectedTestCase.Traits.AddRange(expectedTraits); }
public override void Run() { Run(() => Run(TestCaseMapper.GetMappedTests())); }