Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7f4507d
Removing System.Runtime.Remoting dependencies, these aren't supported…
0x4D616E75 Jan 20, 2019
b4e30fc
fix property override warning
0x4D616E75 Jan 20, 2019
0c8092c
upgrade csproj to new format and update dependencies
0x4D616E75 Jan 20, 2019
71eb215
Moving assembly informations from AssemblyInfo.cs to Specuts.csproj
0x4D616E75 Jan 20, 2019
b67d0a0
Removing packages.config
0x4D616E75 Jan 20, 2019
f9b5d00
moving to new csproj format, switch to netcoreapp2.1 framework and re…
0x4D616E75 Jan 20, 2019
eb762ff
Move assembly informations of unit tests to csproj file
0x4D616E75 Jan 20, 2019
2ec4c7e
Switching SpecNuts.Json to new .netstandard2.0
0x4D616E75 Jan 20, 2019
e9b0d8e
move SpecNuts.ApprovalTestSuite to new csproj format and set target f…
0x4D616E75 Jan 23, 2019
7f29dcd
remove unused packages.config and add missing nuget.target to project…
0x4D616E75 Jan 23, 2019
e6b6922
Fix CS1998 warning
0x4D616E75 Jan 23, 2019
4c35410
Removing deprecated app.config and switch to new specflow.json
0x4D616E75 Jan 23, 2019
70f8e5b
Switch from depreated use of ScenarioContext.Current and FeatureConte…
0x4D616E75 Jan 23, 2019
84edd62
fix override of step name and some code cleaning in CreateStep method
0x4D616E75 Mar 22, 2019
6a1bb4f
get CreateStep working, if method and args missing
0x4D616E75 Mar 22, 2019
f98f6b0
Add hooks to log test steps
0x4D616E75 Mar 22, 2019
0853f4a
update nuget packages
0x4D616E75 Mar 22, 2019
86c68c5
Update Specflow nuget packages to latest version. Now Specflow versio…
0x4D616E75 Apr 15, 2019
9be3355
Update CI setting to restore nuget packages before build
0x4D616E75 Apr 15, 2019
75e00a4
update appveyor.yml to use VS2017 image
0x4D616E75 Apr 15, 2019
ea3a672
Fix call of async reportStep method in nestedStep test
0x4D616E75 Apr 15, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions SpecNuts.ApprovalTestSuite/App.config

This file was deleted.

8 changes: 0 additions & 8 deletions SpecNuts.ApprovalTestSuite/App.config.transform

This file was deleted.

24 changes: 1 addition & 23 deletions SpecNuts.ApprovalTestSuite/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.

[assembly: AssemblyTitle("SpecNuts.ApprovalTestSuite")]
[assembly:
AssemblyDescription(
"A forked from SpecResults.ApprovalTestSuite project to provide the ability to generate json file in cucumber format.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("William Sia")]
[assembly: AssemblyProduct("SpecNuts.ApprovalTestSuite")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -24,18 +16,4 @@

// The following GUID is for the ID of the typelib if this project is exposed to COM

[assembly: Guid("a5289c34-47cc-4acf-80ef-d286a5779959")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: Guid("a5289c34-47cc-4acf-80ef-d286a5779959")]
113 changes: 45 additions & 68 deletions SpecNuts.ApprovalTestSuite/SpecNuts.ApprovalTestSuite.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<AssemblyTitle>SpecNuts.ApprovalTestSuite"</AssemblyTitle>
<Configuration></Configuration>
<Description>A forked from SpecResults.ApprovalTestSuite project to provide the ability to generate json file in cucumber format.</Description>
<Company>William Sia</Company>
<Product>SpecNuts.ApprovalTestSuite"</Product>
<Copyright>Copyright © 2016</Copyright>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<InformationalVersion>1.0.0</InformationalVersion>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BBA703FA-94C4-437F-9961-2A321163988A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SpecResults.ApprovalTestSuite</RootNamespace>
<AssemblyName>SpecResults.ApprovalTestSuite</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFramework>netcoreapp2.1</TargetFramework>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
Expand Down Expand Up @@ -56,79 +69,43 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

<ItemGroup>
<Reference Include="ApprovalTests">
<HintPath>..\packages\ApprovalTests.3.0.5\lib\net40\ApprovalTests.dll</HintPath>
</Reference>
<Reference Include="ApprovalUtilities">
<HintPath>..\packages\ApprovalUtilities.3.0.5\lib\net35\ApprovalUtilities.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.ValueTuple">
<HintPath>..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="TechTalk.SpecFlow">
<HintPath>..\packages\SpecFlow.2.3.1\lib\net45\TechTalk.SpecFlow.dll</HintPath>
</Reference>
<PackageReference Include="nunit" Version="3.11.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="ApprovalTests" Version="3.0.22" />
<PackageReference Include="SpecFlow" Version="3.0.199" />
<PackageReference Include="SpecFlow.NUnit" Version="3.0.199" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.0.199" />
</ItemGroup>

<ItemGroup>
<Compile Include="TestSuite.feature.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>TestSuite.feature</DependentUpon>
</Compile>
<Compile Include="Steps.ApprovalTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Steps.Definitions.cs" />
<None Remove="App.config.transform" />
<None Remove="approvals\SpecNuts.Json.JsonReporter\approval.txt" />
<None Remove="approvals\SpecNuts.Json.JsonReporter\received.txt" />
</ItemGroup>
<ItemGroup>
<Content Include="approvals\SpecNuts.Json.JsonReporter\approval.txt" />
<Content Include="approvals\SpecNuts.Json.JsonReporter\received.txt" />
<None Include="App.config" />
<Content Include="App.config.transform" />
<None Include="packages.config" />
<None Include="TestSuite.feature">
<Generator>SpecFlowSingleFileGenerator</Generator>
<LastGenOutput>TestSuite.feature.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SpecNuts.Json\SpecNuts.Json.csproj">
<Project>{c830c923-5398-4f28-99c2-1592ee5f4f7b}</Project>
<Name>SpecNuts.Json</Name>
</ProjectReference>
<ProjectReference Include="..\SpecNuts\SpecNuts.csproj">
<Project>{eaba391e-6b65-4e5c-8842-3d71a5f97b4f}</Project>
<Name>SpecNuts</Name>
</ProjectReference>
<ProjectReference Include="..\SpecNuts\SpecNuts.csproj" />
<ProjectReference Include="..\SpecNuts.Json\SpecNuts.Json.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="approvals\" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
<Compile Update="TestSuite.feature.cs">
<DependentUpon>TestSuite.feature</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<None Update="specflow.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Import Project="..\packages\SpecFlow.2.3.1\build\SpecFlow.targets" Condition="Exists('..\packages\SpecFlow.2.3.1\build\SpecFlow.targets')" />
</Project>
14 changes: 11 additions & 3 deletions SpecNuts.ApprovalTestSuite/Steps.Definitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ namespace SpecResults.ApprovalTestSuite
[Binding]
public partial class Steps : ReportingStepDefinitions
{
[BeforeTestRun]
private readonly ScenarioContext _scenarioContext;
public Steps(ScenarioContext scenarioContext)
{
_scenarioContext = scenarioContext;
}

[BeforeTestRun]
public static void BeforeTestRun()
{
Reporters.FixedRunTime = DateTime.MinValue;
Expand All @@ -25,6 +31,8 @@ public void GivenAScenarioIsSpecified()
[When(@"the tests run")]
public async Task WhenTheTestsRun()
{
// Prevents CS1998
await Task.Run(() => { });
}

[Then(@"a report is generated")]
Expand All @@ -50,7 +58,7 @@ public void ThenReportIsGenerated(int p0)
[When(@"a step is not implemented")]
public void WhenAStepIsNotImplemented()
{
ScenarioContext.Current.Pending();
_scenarioContext.Pending();
}

[When]
Expand Down Expand Up @@ -87,7 +95,7 @@ public void When_a_step_uses_method_name_underscore_style_with_a_table_param_and
[When(@"a child step was executed")]
public void WhenAChildStepWasExecuted()
{
ReportStep(WhenTheTestsRun);
ReportStep(_scenarioContext, WhenTheTestsRun).Wait();
}

[Given(@"a ""(.*)"" scenario is specified with a multi-line argument")]
Expand Down
Loading