Skip to content

Commit

Permalink
#12 added support for MSTest SpecFlow implementations (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
gubpalma authored Apr 8, 2024
1 parent d34f181 commit 6021a7f
Show file tree
Hide file tree
Showing 7 changed files with 481 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
internal static class Constants
{
public const string MsTestTestAttribute = "Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute";
public const string NUnitTestAttribute = "NUnit.Framework.TestAttribute";
public const string XUnitFactAttribute = "Xunit.SkippableFactAttribute";
public const string XUnitTheoryAttribute = "Xunit.SkippableTheoryAttribute";
Expand All @@ -10,6 +11,7 @@ internal static class Constants

public const string NUnitTestCaseAttribute = "NUnit.Framework.TestCaseAttribute";
public const string XUnitInlineDataAttribute = "Xunit.InlineDataAttribute";
public const string MsTestTestPropertyAttribute = "Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute";

public static readonly string[] ScenarioStepFunctions = { "And", "Given", "When", "Then" };

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Extensions.Logging;
using Mono.Cecil;
Expand All @@ -15,7 +13,6 @@ public class FeatureExtractor : IFeatureExtractor
private const string CustomFeatureAttributeValue = "TechTalk.SpecFlow";
private const string FeatureSetupMethodName = "FeatureSetup";
private const string FeatureInfoTypeName = "TechTalk.SpecFlow.FeatureInfo";
private const string DebuggingModeAttributeName = "System.Diagnostics.DebuggableAttribute/DebuggingModes";

private readonly IScenarioExtractionHandler _scenarioExtractionHandler;
private readonly ILogger<FeatureExtractor> _logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace SpecFlowToMarkdown.Infrastructure.AssemblyLoad.Extractors
{
public interface IScenarioExtractor
{
public bool IsApplicable(string attributeName);
public bool IsApplicable(MethodDefinition method);

public SpecFlowScenario ExtractScenario(MethodDefinition method);
public SpecFlowScenario ExtractScenario(MethodDefinition method, TypeDefinition type);
}
}
Loading

0 comments on commit 6021a7f

Please sign in to comment.