This repository has been archived by the owner on Jun 12, 2021. It is now read-only.
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 #11 from adamralph/rc1
expanded samples for RC smoke tests
- Loading branch information
Showing
28 changed files
with
289 additions
and
15 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Binary file renamed
BIN
+2.67 KB
...ve.Samples.FSharp.Net45.v2.ncrunchproject → ...es.FSharp.Net45.NCrunch.v2.ncrunchproject
Binary file not shown.
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
112 changes: 112 additions & 0 deletions
112
src/Xbehave.Samples.Net45.MSBuild/Xbehave.Samples.Net45.MSBuild.csproj
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,112 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="..\packages\Xbehave.2.0.0-beta008-build523\build\portable-net45\Xbehave.props" Condition="Exists('..\packages\Xbehave.2.0.0-beta008-build523\build\portable-net45\Xbehave.props')" /> | ||
<Import Project="..\packages\xunit.runner.msbuild.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.runner.msbuild.props" Condition="Exists('..\packages\xunit.runner.msbuild.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.runner.msbuild.props')" /> | ||
<Import Project="..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" /> | ||
<Import Project="..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProductVersion>8.0.30703</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{27E0ED44-121C-4DC5-AD15-B43EF6E3DDF0}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Xbehave.Samples</RootNamespace> | ||
<AssemblyName>Xbehave.Samples.net45.msbuild</AssemblyName> | ||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile /> | ||
<NuGetPackageImportStamp>40e130ff</NuGetPackageImportStamp> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>TRACE;DEBUG;NET40</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<StyleCopTreatErrorsAsWarnings>true</StyleCopTreatErrorsAsWarnings> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<WarningsNotAsErrors>612,618</WarningsNotAsErrors> | ||
<CodeAnalysisRuleSet>..\Xbehave.Samples.ruleset</CodeAnalysisRuleSet> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE;DEBUG;NET40</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<StyleCopTreatErrorsAsWarnings>true</StyleCopTreatErrorsAsWarnings> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<WarningsNotAsErrors>612,618</WarningsNotAsErrors> | ||
<CodeAnalysisRuleSet>..\Xbehave.Samples.ruleset</CodeAnalysisRuleSet> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="..\Xbehave.Samples.Net45.NCrunch\**\*.cs" Exclude="..\Xbehave.Samples.Net45.NCrunch\NCrunchCoverageIssues\*.cs;..\Xbehave.Samples.Net45.NCrunch\**\TemporaryGeneratedFile_*.cs;..\Xbehave.Samples.Net45.NCrunch\**\Failures.cs"> | ||
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Folder Include="Properties\" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Reference Include="FluentAssertions, Version=3.3.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\packages\FluentAssertions.3.3.0\lib\net45\FluentAssertions.dll</HintPath> | ||
</Reference> | ||
<Reference Include="FluentAssertions.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\packages\FluentAssertions.3.3.0\lib\net45\FluentAssertions.Core.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="Xbehave, Version=2.0.0.0, Culture=neutral, PublicKeyToken=e4957f48888f9fe8, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\packages\Xbehave.2.0.0-beta008-build523\lib\portable-net45\Xbehave.dll</HintPath> | ||
</Reference> | ||
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll</HintPath> | ||
</Reference> | ||
<Reference Include="xunit.assert, Version=2.0.0.2929, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\packages\xunit.assert.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll</HintPath> | ||
</Reference> | ||
<Reference Include="xunit.core, Version=2.0.0.2929, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\packages\xunit.extensibility.core.2.0.0\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
<PropertyGroup> | ||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
</PropertyGroup> | ||
<Error Condition="!Exists('..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props'))" /> | ||
<Error Condition="!Exists('..\packages\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets'))" /> | ||
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.0.0\build\net20\xunit.runner.visualstudio.props'))" /> | ||
<Error Condition="!Exists('..\packages\xunit.runner.msbuild.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.runner.msbuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.msbuild.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.runner.msbuild.props'))" /> | ||
<Error Condition="!Exists('..\packages\Xbehave.2.0.0-beta008-build523\build\portable-net45\Xbehave.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Xbehave.2.0.0-beta008-build523\build\portable-net45\Xbehave.props'))" /> | ||
</Target> | ||
<Import Project="..\packages\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets" Condition="Exists('..\packages\StyleCop.MSBuild.4.7.49.1\build\StyleCop.MSBuild.Targets')" /> | ||
<!-- 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" Condition="Exists('..\packages\xunit.runner.msbuild.2.0.0\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.runner.msbuild.props')"> | ||
<xunit Assemblies="$(OutputPath)\$(AssemblyName).dll" /> | ||
</Target> | ||
</Project> |
Binary file renamed
BIN
+2.77 KB
...5/Xbehave.Samples.Net45.v2.ncrunchproject → ...e.Samples.Net45.MSBuild.v2.ncrunchproject
Binary file not shown.
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,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="FluentAssertions" version="3.3.0" targetFramework="net451" /> | ||
<package id="StyleCop.MSBuild" version="4.7.49.1" targetFramework="net451" developmentDependency="true" /> | ||
<package id="Xbehave" version="2.0.0-beta008-build523" targetFramework="net451" /> | ||
<package id="xunit" version="2.0.0" targetFramework="net451" /> | ||
<package id="xunit.abstractions" version="2.0.0" targetFramework="net451" /> | ||
<package id="xunit.assert" version="2.0.0" targetFramework="net451" /> | ||
<package id="xunit.core" version="2.0.0" targetFramework="net451" /> | ||
<package id="xunit.extensibility.core" version="2.0.0" targetFramework="net451" /> | ||
<package id="xunit.runner.msbuild" version="2.0.0" targetFramework="net451" /> | ||
<package id="xunit.runner.visualstudio" version="2.0.0" targetFramework="net451" /> | ||
</packages> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,112 @@ | ||
// <copyright file="Failures.cs" company="xBehave.net contributors"> | ||
// Copyright (c) xBehave.net contributors. All rights reserved. | ||
// </copyright> | ||
|
||
namespace Xbehave.Samples | ||
{ | ||
using System; | ||
using System.Reflection; | ||
using FluentAssertions; | ||
using Xbehave; | ||
using Xunit.Sdk; | ||
|
||
public class Failures | ||
{ | ||
[Scenario] | ||
public void FailingScenario() | ||
{ | ||
true.Should().Be(false); | ||
} | ||
|
||
[Scenario] | ||
public void FailingStep() | ||
{ | ||
"Given true is false" | ||
.f(() => true.Should().Be(false)); | ||
} | ||
|
||
[Scenario] | ||
public void PassingStepAndFailingStep() | ||
{ | ||
"Given true is true" | ||
.f(() => true.Should().Be(true)); | ||
|
||
"Then true is false" | ||
.f(() => true.Should().Be(false)); | ||
} | ||
|
||
[Scenario] | ||
public void FailingStepAndPassingStep() | ||
{ | ||
"Given true is false" | ||
.f(() => true.Should().Be(false)); | ||
|
||
"Then true is true" | ||
.f(() => true.Should().Be(true)); | ||
} | ||
|
||
[Scenario] | ||
public void FailingDisposal() | ||
{ | ||
"Given a failing disposable" | ||
.f(c => new FailingDisposable().Using(c)); | ||
} | ||
|
||
[Scenario] | ||
public void FailingTeardown() | ||
{ | ||
"Given a fixture which believes true is false" | ||
.f(c => { }) | ||
.Teardown(() => true.Should().BeFalse()); | ||
} | ||
|
||
[Scenario] | ||
[FailingBefore] | ||
public void FailingBefore() | ||
{ | ||
} | ||
|
||
[Scenario] | ||
[FailingAfter] | ||
public void FailingAfter() | ||
{ | ||
} | ||
|
||
public class FailingFeatureClass | ||
{ | ||
public FailingFeatureClass() | ||
{ | ||
true.Should().BeFalse(); | ||
} | ||
|
||
[Scenario] | ||
public void SomeScenario() | ||
{ | ||
} | ||
} | ||
|
||
public sealed class FailingDisposable : IDisposable | ||
{ | ||
public void Dispose() | ||
{ | ||
true.Should().BeFalse(); | ||
} | ||
} | ||
|
||
public class FailingBeforeAttribute : BeforeAfterTestAttribute | ||
{ | ||
public override void Before(MethodInfo methodUnderTest) | ||
{ | ||
true.Should().BeFalse(); | ||
} | ||
} | ||
|
||
public class FailingAfterAttribute : BeforeAfterTestAttribute | ||
{ | ||
public override void After(MethodInfo methodUnderTest) | ||
{ | ||
true.Should().BeFalse(); | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,33 @@ | ||
// <copyright file="SkippedScenarios.cs" company="xBehave.net contributors"> | ||
// Copyright (c) xBehave.net contributors. All rights reserved. | ||
// </copyright> | ||
|
||
namespace Xbehave.Samples | ||
{ | ||
using FluentAssertions; | ||
using Xbehave; | ||
using Xbehave.Samples.Fixtures; | ||
using Xunit; | ||
|
||
public class SkippedScenarios | ||
{ | ||
[Scenario(Skip = "It's no good, I just can't figure out addition today.")] | ||
public void Addition(int x, int y, Calculator calculator, int answer) | ||
{ | ||
"Given the number 1" | ||
.f(() => x = 1); | ||
|
||
"And the number 2" | ||
.f(() => y = 2); | ||
|
||
"And a calculator" | ||
.f(() => calculator = new Calculator()); | ||
|
||
"When I add the numbers together" | ||
.f(() => answer = calculator.Add(x, y)); | ||
|
||
"Then the answer is 3" | ||
.f(() => answer.Should().Be(3)); | ||
} | ||
} | ||
} |
File renamed without changes.
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
File renamed without changes.
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
Binary file added
BIN
+2.67 KB
src/Xbehave.Samples.Net45.NCrunch/Xbehave.Samples.Net45.NCrunch.v2.ncrunchproject
Binary file not shown.
File renamed without changes.
Oops, something went wrong.