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 #615 of tommarien/UseShouldly
Bridge NUnit.Should to Shouldly
- Loading branch information
Showing
5 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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
59 changes: 59 additions & 0 deletions
59
src/FluentMigrator.Tests/NUnitShouldShouldlyBridgeExtensions.cs
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,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); | ||
} | ||
} | ||
} |