Permalink
Browse files

Bridge NUnit.Should to Shouldly

  • Loading branch information...
tommarien committed Jun 8, 2015
1 parent b8b7255 commit b93799511be910c2573071afcac20fb481a0131e
View
Binary file not shown.
View
Binary file not shown.
View
BIN -5.5 KB lib/nunit.should.dll
Binary file not shown.
@@ -117,6 +117,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\Hana\Sap.Data.Hana.v3.5.dll</HintPath>
</Reference>
<Reference Include="Shouldly">
<HintPath>..\..\lib\Shouldly\2.5.0\Shouldly.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core">
@@ -139,9 +142,6 @@
<Reference Include="nunit.framework">
<HintPath>..\..\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="nunit.should">
<HintPath>..\..\lib\nunit.should.dll</HintPath>
</Reference>
<Reference Include="Oracle.DataAccess">
<HintPath>..\..\lib\Oracle.DataAccess.dll</HintPath>
</Reference>
@@ -291,6 +291,7 @@
<Compile Include="Integration\SchemaDump\SchemaTestWriter.cs" />
<Compile Include="Integration\VersionMigrationTests.cs" />
<Compile Include="MigrationValidatorTests.cs" />
<Compile Include="NUnitShouldShouldlyBridgeExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Unit\AnnouncerExtensionsTests.cs" />
<Compile Include="Unit\Announcers\AnnouncerTests.cs" />
@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using Shouldly;
namespace NUnit.Should
{
public static class NUnitShouldShouldlyBridgeExtensions
{
public static void ShouldBeTrue(this bool actual)
{
ShouldBeTestExtensions.ShouldBe(actual, true);
}
public static void ShouldBeFalse(this bool actual)
{
ShouldBeTestExtensions.ShouldBe(actual, false);
}
public static void ShouldNotBeNull<T>(this T actual) where T : class
{
ShouldBeTestExtensions.ShouldNotBe(actual, null);
}
public static void ShouldBeNull<T>(this T actual) where T : class
{
ShouldBeTestExtensions.ShouldBe(actual, null);
}
public static void ShouldBeGreaterThan<T>(this T actual, T expected) where T : IComparable<T>
{
ShouldBeTestExtensions.ShouldBeGreaterThan(actual, expected);
}
public static void ShouldBe<T>(this T actual, T expected)
{
ShouldBeTestExtensions.ShouldBe(actual, expected);
}
public static void ShouldBeSameAs<T>(this T actual, T expected)
{
ShouldBeTestExtensions.ShouldBeSameAs(actual, expected);
}
public static void ShouldContain<T>(this IEnumerable<T> collection, T item)
{
ShouldBeEnumerableTestExtensions.ShouldContain(collection, item);
}
public static void ShouldNotContain<T>(this IEnumerable<T> collection, T item)
{
ShouldBeEnumerableTestExtensions.ShouldNotContain(collection, item);
}
public static void ShouldBeOfType<T>(this object actual)
{
ShouldBeTestExtensions.ShouldBeOfType<T>(actual);
}
}
}

0 comments on commit b937995

Please sign in to comment.