-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from gman-au/3-xunit-support
3 xunit support
- Loading branch information
Showing
27 changed files
with
1,148 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/6.0/SpecFlowToMarkdown.Domain/TestAssembly/SpecFlowArgument.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace SpecFlowToMarkdown.Domain.TestAssembly | ||
{ | ||
public class SpecFlowArgument | ||
{ | ||
public string ArgumentName { get; set; } | ||
|
||
public object ArgumentValue { get; set; } | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/6.0/SpecFlowToMarkdown.Domain/TestAssembly/SpecFlowCase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace SpecFlowToMarkdown.Domain.TestAssembly | ||
{ | ||
public class SpecFlowCase | ||
{ | ||
public IEnumerable<SpecFlowArgument> Arguments { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/6.0/SpecFlowToMarkdown.Infrastructure.AssemblyLoad/Extractors/Constants.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace SpecFlowToMarkdown.Infrastructure.AssemblyLoad.Extractors | ||
{ | ||
internal static class Constants | ||
{ | ||
public const string NUnitTestAttribute = "NUnit.Framework.TestAttribute"; | ||
public const string XUnitFactAttribute = "Xunit.SkippableFactAttribute"; | ||
public const string XUnitTheoryAttribute = "Xunit.SkippableTheoryAttribute"; | ||
|
||
public const string ScenarioInfoTypeName = "TechTalk.SpecFlow.ScenarioInfo"; | ||
|
||
public const string NUnitTestCaseAttribute = "NUnit.Framework.TestCaseAttribute"; | ||
public const string XUnitInlineDataAttribute = "Xunit.InlineDataAttribute"; | ||
|
||
public static readonly string[] ScenarioStepFunctions = { "And", "Given", "When", "Then" }; | ||
|
||
public const string StringFormatFunctionName = "Format"; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...6.0/SpecFlowToMarkdown.Infrastructure.AssemblyLoad/Extractors/Extensions/InstructionEx.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Mono.Cecil.Cil; | ||
|
||
namespace SpecFlowToMarkdown.Infrastructure.AssemblyLoad.Extractors.Extensions | ||
{ | ||
internal static class InstructionEx | ||
{ | ||
public static Instruction StepPrevious(this Instruction instruction, int times) | ||
{ | ||
for (var i = 0; i < times && instruction != null; i++) | ||
{ | ||
instruction = | ||
instruction | ||
.Previous; | ||
} | ||
|
||
return instruction; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...0/SpecFlowToMarkdown.Infrastructure.AssemblyLoad/Extractors/IScenarioExtractionHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System.Collections.Generic; | ||
using Mono.Cecil; | ||
using SpecFlowToMarkdown.Domain.TestAssembly; | ||
|
||
namespace SpecFlowToMarkdown.Infrastructure.AssemblyLoad.Extractors | ||
{ | ||
public interface IScenarioExtractionHandler | ||
{ | ||
public IEnumerable<SpecFlowScenario> ExtractScenarios(TypeDefinition type); | ||
} | ||
} |
7 changes: 4 additions & 3 deletions
7
src/6.0/SpecFlowToMarkdown.Infrastructure.AssemblyLoad/Extractors/IScenarioExtractor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
using System.Collections.Generic; | ||
using Mono.Cecil; | ||
using Mono.Cecil; | ||
using SpecFlowToMarkdown.Domain.TestAssembly; | ||
|
||
namespace SpecFlowToMarkdown.Infrastructure.AssemblyLoad.Extractors | ||
{ | ||
public interface IScenarioExtractor | ||
{ | ||
public IEnumerable<SpecFlowScenario> ExtractScenarios(TypeDefinition type); | ||
public bool IsApplicable(string attributeName); | ||
|
||
public SpecFlowScenario ExtractScenario(MethodDefinition method); | ||
} | ||
} |
Oops, something went wrong.