Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>
12 changes: 12 additions & 0 deletions src/SampleStories/LameExternalStory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Xunit;

namespace SampleStories
{
public class LameExternalStory
{
int state = 0;
public void GivenANumberThree() => state = 3;
public void WhenIMultiplyTheNumberByItsef() => state *= state;
public void ThenTheNumberIsSquared() => Assert.Equal(9, state);
}
}
11 changes: 11 additions & 0 deletions src/SampleStories/SampleStories.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="xunit.assert" Version="2.9.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.7.0" />
<PackageReference Include="Microsoft.Testing.Platform" Version="2.2.3" />
<PackageReference Include="shouldly" Version="4.3.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using SampleStories;
using System;
using System.Runtime.CompilerServices;
using TestStack.BDDfy.Reporters;
Expand Down Expand Up @@ -36,5 +37,22 @@ public void ShouldProduceExpectedHtmlWithExamples()
var sut = new MetroReportBuilder();
ReportApprover.Approve(model, sut);
}

[Fact]
[MethodImpl(MethodImplOptions.NoInlining)]
public void ShouldProduceExpectedHtmlWithExternalStories()
{
var story = new LameExternalStory();
var bddfiedStories = new[] { story.BDDfy() };

var reportModel = bddfiedStories.ToReportModel();
var model = new HtmlReportModel(reportModel)
{
RunDate = new DateTime(2014, 3, 25, 11, 30, 5)
};

var sut = new MetroReportBuilder();
ReportApprover.Approve(model, sut);
}
}
}
3 changes: 1 addition & 2 deletions src/TestStack.BDDfy.Tests/TestStack.BDDfy.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<ItemGroup>
<ProjectReference Include="../TestStack.BDDfy/TestStack.BDDfy.csproj" />
<ProjectReference Include="..\SampleStories\SampleStories.csproj" />
</ItemGroup>

<ItemGroup>
Expand All @@ -14,8 +15,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.7.0" />
<PackageReference Include="Microsoft.Testing.Platform" Version="2.2.3" />
<PackageReference Include="nsubstitute" Version="5.3.0" />
<PackageReference Include="shouldly" Version="4.3.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
Expand Down
14 changes: 14 additions & 0 deletions src/TestStack.BDDfy.sln
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestStack.BDDfy", "TestStac
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestStack.BDDfy.Samples", "Samples\TestStack.BDDfy.Samples\TestStack.BDDfy.Samples.csproj", "{267EA75C-EB57-4A15-80E7-9804A7B5F52B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleStories", "SampleStories\SampleStories.csproj", "{A10675CF-42B7-45E2-A36E-A88454FCDEA7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -69,6 +71,18 @@ Global
{267EA75C-EB57-4A15-80E7-9804A7B5F52B}.Release|x64.Build.0 = Release|Any CPU
{267EA75C-EB57-4A15-80E7-9804A7B5F52B}.Release|x86.ActiveCfg = Release|Any CPU
{267EA75C-EB57-4A15-80E7-9804A7B5F52B}.Release|x86.Build.0 = Release|Any CPU
{A10675CF-42B7-45E2-A36E-A88454FCDEA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A10675CF-42B7-45E2-A36E-A88454FCDEA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A10675CF-42B7-45E2-A36E-A88454FCDEA7}.Debug|x64.ActiveCfg = Debug|Any CPU
{A10675CF-42B7-45E2-A36E-A88454FCDEA7}.Debug|x64.Build.0 = Debug|Any CPU
{A10675CF-42B7-45E2-A36E-A88454FCDEA7}.Debug|x86.ActiveCfg = Debug|Any CPU
{A10675CF-42B7-45E2-A36E-A88454FCDEA7}.Debug|x86.Build.0 = Debug|Any CPU
{A10675CF-42B7-45E2-A36E-A88454FCDEA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A10675CF-42B7-45E2-A36E-A88454FCDEA7}.Release|Any CPU.Build.0 = Release|Any CPU
{A10675CF-42B7-45E2-A36E-A88454FCDEA7}.Release|x64.ActiveCfg = Release|Any CPU
{A10675CF-42B7-45E2-A36E-A88454FCDEA7}.Release|x64.Build.0 = Release|Any CPU
{A10675CF-42B7-45E2-A36E-A88454FCDEA7}.Release|x86.ActiveCfg = Release|Any CPU
{A10675CF-42B7-45E2-A36E-A88454FCDEA7}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading