diff --git a/.gitignore b/.gitignore
index 3fa5555..3ff42c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ obj
*.userprefs
*.user
*.sln.DotSettings.user
+*.sln.ide
# mstest test results
TestResults
diff --git a/BCLExtensions.nuspec b/BCLExtensions.nuspec
index a950204..e5c322c 100644
--- a/BCLExtensions.nuspec
+++ b/BCLExtensions.nuspec
@@ -8,11 +8,12 @@
csmacnz
https://github.com/csMACnz/BCLExtensions/blob/master/LICENSE
https://github.com/csMACnz/BCLExtensions
+ http://img.csmac.nz/BCLExtensions.net-32.png
false
Base Class Library Extensions for C# base class library types like System.String.
Base Class Library Extensions for C# base class library types like System.String.
en-US
Copyright 2015
- BCLExtensions, PCL, Extensions, Extension Methods, Helpers, Base Class Library
+ BCLExtensions PCL Extensions Extension Methods Helpers Portable Base Class Library
diff --git a/README.md b/README.md
index 0facac3..9cec30d 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,19 @@
BCLExtensions
=============
+
+
[![License](http://img.shields.io/:license-mit-blue.svg)](http://csmacnz.mit-license.org)
[![NuGet](https://img.shields.io/nuget/v/BCLExtensions.svg)](https://www.nuget.org/packages/BCLExtensions)
[![NuGet](https://img.shields.io/nuget/dt/BCLExtensions.svg)](https://www.nuget.org/packages/BCLExtensions)
-[![Badges](http://img.shields.io/:badges-12/12-ff6799.svg)](https://github.com/badges/badgerbadgerbadger)
+[![Gratipay](http://img.shields.io/gratipay/csMACnz.svg)](https://gratipay.com/csMACnz/)
+[![Source Browser](https://img.shields.io/badge/Browse-Source-green.svg)](http://sourcebrowser.io/Browse/csMACnz/BCLExtensions)
+[![Badges](http://img.shields.io/:badges-14/14-ff6799.svg)](https://github.com/badges/badgerbadgerbadger)
+
+[![Stories in Ready](https://badge.waffle.io/csmacnz/BCLExtensions.png?label=ready&title=Ready)](https://waffle.io/csmacnz/BCLExtensions)
+[![Stories in progress](https://badge.waffle.io/csmacnz/BCLExtensions.png?label=in%20progress&title=In%20Progress)](https://waffle.io/csmacnz/BCLExtensions)
+[![Issue Stats](http://www.issuestats.com/github/csMACnz/BCLExtensions/badge/pr)](http://www.issuestats.com/github/csMACnz/BCLExtensions)
+[![Issue Stats](http://www.issuestats.com/github/csMACnz/BCLExtensions/badge/issue)](http://www.issuestats.com/github/csMACnz/BCLExtensions)
[![AppVeyor Build status](https://img.shields.io/appveyor/ci/MarkClearwater/bclextensions.svg)](https://ci.appveyor.com/project/MarkClearwater/bclextensions)
[![Travis Build Status](https://img.shields.io/travis/csMACnz/BCLExtensions.svg)](https://travis-ci.org/csMACnz/BCLExtensions)
@@ -12,11 +21,6 @@ BCLExtensions
[![Coverage Status](https://img.shields.io/coveralls/csMACnz/BCLExtensions.svg)](https://coveralls.io/r/csMACnz/BCLExtensions?branch=master)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/3770/badge.svg)](https://scan.coverity.com/projects/3770)
-[![Stories in Ready](https://badge.waffle.io/csmacnz/BCLExtensions.png?label=ready&title=Ready)](https://waffle.io/csmacnz/BCLExtensions)
-[![Stories in progress](https://badge.waffle.io/csmacnz/BCLExtensions.png?label=in%20progress&title=In%20Progress)](https://waffle.io/csmacnz/BCLExtensions)
-[![Issue Stats](http://www.issuestats.com/github/csMACnz/BCLExtensions/badge/pr)](http://www.issuestats.com/github/csMACnz/BCLExtensions)
-[![Issue Stats](http://www.issuestats.com/github/csMACnz/BCLExtensions/badge/issue)](http://www.issuestats.com/github/csMACnz/BCLExtensions)
-
Base Class Library Extensions for C# base class library classes, across .Net, Silverlight, WinRT.
For now, this is build upon the most generic PCL possible, but may explore specific additional components if required.
@@ -31,258 +35,12 @@ PCL Profile(Profile328)
* Xamarin.Android
* Xamarin.iOS
-At some point this can include nuget packages.
-
-
-Proposed Extensions
-===================
-
-String Extensions
------------------
-* string Left(this string value, int length)
-* string Right(this string value, int length)
-* string SafeLeft(this string value, int length)
-* string SafeRight(this string value, int length)
-* string SafeToString<T>(this T item)
-* string SafeTrim(this string value)
-* string SafeTrimStart(this string value)
-* string SafeTrimEnd(this string value)
-* string SafeTruncate(this string value)
-* string ToLines(this string value)
-* string ToNoBlankLines(this string value)
-* string JoinWith(this string value, string delimiter)
-* string JoinAsLines(this string value)
-* long NumberOfLines(this string s);
-* long NumberOfNonBlankLines(this string s);
-* bool IsNumeric(this string value, bool trimWhitespace = true)
-
-Timespan Extensions
--------------------
-* TimeSpan Years(this int value)
-* TimeSpan Months(this int value)
-* TimeSpan Weeks(this int value)
-* TimeSpan Days(this int value)
-* TimeSpan Hours(this int value)
-* TimeSpan Minutes(this int value)
-* TimeSpan Seconds(this int value)
-* TimeSpan Milliseconds(this int value)
-
-
-DateTime Extensions
--------------------
-* DateTime Ago(this TimeSpan interval)
-* DateTime Since(this TimeSpan interval, DateTime origin)
-
-
-(Mutable)Collection Extensions
--------------------
-* void AddRange<T>(this ICollection<T> collection, IEnumerable<T> itemsToAppend)
-* ICollection<T> RemoveEach<T>(this ICollection<T> collection)
-* ICollection<T> RemoveEach<T>(this ICollection<T> collection, Func<T, bool> whereExpression)
-* ICollection<T> RemoveEach<T>(this ICollection<T> collection, Func<T, int, bool> whereExpression)
-* ICollection<T> RemoveEachInReverse<T>(this ICollection<T> collection)
-* ICollection<T> RemoveEachInReverse<T>(this ICollection<T> collection, Func<T, bool> whereExpression)
-* ICollection<T> RemoveEachInReverse<T>(this ICollection<T> collection, Func<T, int, bool> whereExpression)
-* ICollection<T> OrNullIfEmpty(this ICollection<T> collection)
-* ICollection<T> OrEmptyIfNull(this ICollection<T> collection)
-
-
-IList Extensions
-----------------------
-* IList<T> RemoveEach<T>(this IList<T> items)
-* IList<T> RemoveEach<T>(this IList<T> items, Func<T, bool> whereExpression)
-* IList<T> RemoveEach<T>(this IList<T> items, Func<T, int, bool> whereExpression)
-* IList<T> RemoveEachInReverse<T>(this IList<T> items)
-* IList<T> RemoveEachInReverse<T>(this IList<T> items, Func<T, bool> whereExpression)
-* IList<T> RemoveEachInReverse<T>(this IList<T> items, Func<T, int, bool> whereExpression)
-* IList<T> RemoveEachByIndex<T>(this IList<T> items)
-* IList<T> RemoveEachByIndex<T>(this IList<T> items, Func<T, bool> whereExpression)
-* IList<T> RemoveEachByIndex<T>(this IList<T> items, Func<T, int, bool> whereExpression)
-* IList<T> RemoveEachByIndexInReverse<T>(this IList<T> items)
-* IList<T> RemoveEachByIndexInReverse<T>(this IList<T> items, Func<T, bool> whereExpression)
-* IList<T> RemoveEachByIndexInReverse<T>(this IList<T> items, Func<T, int, bool> whereExpression)
-* IList<T> OrNullIfEmpty(this IList<T> items)
-* IList<T> OrEmptyIfNull(this IList<T> items)
-
-
-List Extensions
-----------------------
-* List<T> RemoveEach<T>(this List<T> items)
-* List<T> RemoveEach<T>(this List<T> items, Func<T, bool> whereExpression)
-* List<T> RemoveEach<T>(this List<T> items, Func<T, int, bool> whereExpression)
-* List<T> RemoveEachInReverse<T>(this List<T> items)
-* List<T> RemoveEachInReverse<T>(this List<T> items, Func<T, bool> whereExpression)
-* List<T> RemoveEachInReverse<T>(this List<T> items, Func<T, int, bool> whereExpression)
-* List<T> RemoveEachByIndex<T>(this List<T> items)
-* List<T> RemoveEachByIndex<T>(this List<T> items, Func<T, bool> whereExpression)
-* List<T> RemoveEachByIndex<T>(this List<T> items, Func<T, int, bool> whereExpression)
-* List<T> RemoveEachByIndexInReverse<T>(this List<T> items)
-* List<T> RemoveEachByIndexInReverse<T>(this List<T> items, Func<T, bool> whereExpression)
-* List<T> RemoveEachByIndexInReverse<T>(this List<T> items, Func<T, int, bool> whereExpression)
-* List<T> OrNullIfEmpty(this List<T> items)
-* List<T> OrEmptyIfNull(this List<T> items)
-
-
-IEnumerable Extensions
-----------------------
-* List<T> ToListOf<T>(this IEnumerable items)
-* List<T> SafeToListOf<T>(this IEnumerable items)
-* List<T> SafeToList<T>(this IEnumerable<T> items)
-* T[] SafeToArray<T>(this IEnumerable<T> items)
-* Dictionary<TKey, TItem> SafeToDictionary<TItem, TKey>(this IEnumerable<T> items, Func<TItem, TKey> keySelector)
-* HashSet<T> SafeToHashSet<T>(this IEnumerable<T> items)
-* HashSet<T> SafeToHashSet<T>(this IEnumerable<T> items, IEqualityComparer<T> equalityComparer)
-
-
-Dictionary Extensions
----------------------
-* Dictionary<TKey, TValue> OrNullIfEmpty(this Dictionary<TKey, TValue> dictionary)
-* Dictionary<TKey, TValue> OrEmptyIfNull(this Dictionary<TKey, TValue> dictionary)
-* T GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key) where TValue : struct
-* T GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue)
-
-
-Type Extensions
----------------
-* bool DerivesFrom<Type>(this object item) where T : class
-* bool IsNullable(this Type itemType)
-* IEnumerable<Type> SafeGetTypes(this Assembly assembly)
-
-
-EnumExtensions
---------------
-* void EnsureIsEnum<T>() where T : struct, IComparable, IConvertible, IFormattable
-* bool IsEnum<T>() where T : struct, IComparable, IConvertible, IFormattable
-* void EnsureIsEnum(this object enumerationValue)
-* bool IsEnum(this object enumerationValue)
-
-
-IntExtensions
--------------
-* bool IsBetween(this int value, int lowerLimit, int upperLimit)
-* bool IsBetweenExclusive(this int value, int lowerLimit, int upperLimit)
-* bool IsBetween(this int value, ExclusiveInteger lowerLimit, ExclusiveInteger upperLimit)
-* bool IsBetween(this int value, InclusiveInteger lowerLimit, ExclusiveInteger upperLimit)
-* bool IsBetween(this int value, ExclusiveInteger lowerLimit, InclusiveInteger upperLimit)
-* bool IsBetween(this int value, InclusiveInteger lowerLimit, InclusiveInteger upperLimit)
-* InclusiveInteger Inclusive(this int value)
-* ExclusiveInteger Exclusive(this int value)
-
-Example : 5.IsBetween(2.Exclusive(), 5.Inclusive())
-
-
-LongExtensions
--------------
-* bool IsBetween(this long value, long lowerLimit, long upperLimit)
-* bool IsBetweenExclusive(this long value, long lowerLimit, long upperLimit)
-* bool IsBetween(this long value, ExclusiveLongInteger lowerLimit, ExclusiveLongInteger upperLimit)
-* bool IsBetween(this long value, InclusiveLongInteger lowerLimit, ExclusiveLongInteger upperLimit)
-* bool IsBetween(this long value, ExclusiveLongInteger lowerLimit, InclusiveLongInteger upperLimit)
-* bool IsBetween(this long value, InclusiveLongInteger lowerLimit, InclusiveLongInteger upperLimit)
-* InclusiveLongInteger Inclusive(this long value)
-* ExclusiveLongInteger Exclusive(this long value)
-
-Example: 5.IsBetween(2.Exclusive(), 5.Inclusive())
-
-
-DecimalExtensions
--------------
-* bool IsBetween(this decimal value, decimal lowerLimit, decimal upperLimit)
-* bool IsBetweenExclusive(this decimal value, decimal lowerLimit, decimal upperLimit)
-* bool IsBetween(this decimal value, ExclusiveDecimal lowerLimit, ExclusiveDecimal upperLimit)
-* bool IsBetween(this decimal value, InclusiveDecimal lowerLimit, ExclusiveDecimal upperLimit)
-* bool IsBetween(this decimal value, ExclusiveDecimal lowerLimit, InclusiveDecimal upperLimit)
-* bool IsBetween(this decimal value, InclusiveDecimal lowerLimit, InclusiveDecimal upperLimit)
-* InclusiveDecimal Inclusive(this decimal value)
-* ExclusiveDecimal Exclusive(this decimal value)
-
-Example: (5m).IsBetween((2m).Exclusive(), (5m).Inclusive())
-
-
-Func Extensions
-----------------------
-* Action AsActionUsing<T1, T2, T3, TResult>(this Func<T1, T2, T3, TResult> action, T1 parameter1, T2 parameter2, T3 parameter3)
-* Action AsActionUsing<T1, T2, T3, T4, TResult>(this Func<T1, T2, T3, T4, TResult> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4)
-* Action AsActionUsing<T1, T2, T3, T4, T5, TResult>(this Func<T1, T2, T3, T4, T5, TResult> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5)
-* Action AsActionUsing<T1, T2, T3, T4, T5, T6, TResult>(this Func<T1, T2, T3, T4, T5, T6, TResult> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5, T6 parameter6)
-* Action AsActionUsing<T1, T2, T3, T4, T5, T6, T7, TResult>(this Func<T1, T2, T3, T4, T5, T6, T7, TResult> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5, T6 parameter6, T7 parameter7)
-* Action AsActionUsing<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(this Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5, T6 parameter6, T7 parameter7, T8 parameter8)
-
-
-Action Extensions
-----------------------
-* Action AsActionUsing<T1>(this Action<T1> action, T1 parameter1)
-* Action AsActionUsing<T1, T2>(this Action<T1, T2> action, T1 parameter1, T2 parameter2)
-* Action AsActionUsing<T1, T2, T3>(this Action<T1, T2, T3> action, T1 parameter1, T2 parameter2, T3 parameter3)
-* Action AsActionUsing<T1, T2, T3, T4>(this Action<T1, T2, T3, T4> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4)
-* Action AsActionUsing<T1, T2, T3, T4, T5>(this Action<T1, T2, T3, T4, T5> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5)
-* Action AsActionUsing<T1, T2, T3, T4, T5, T6>(this Action<T1, T2, T3, T4, T5, T6> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5, T6 parameter6)
-* Action AsActionUsing<T1, T2, T3, T4, T5, T6, T7>(this Action<T1, T2, T3, T4, T5, T6, T7> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5, T6 parameter6, T7 parameter7)
-* Action AsActionUsing<T1, T2, T3, T4, T5, T6, T7, T8>(this Action<T1, T2, T3, T4, T5, T6, T7, T8> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5, T6 parameter6, T7 parameter7, T8 parameter8)
-
-
-ExpressionExtensions
---------------------
-* string GetMemberName<TExpressionBody>(this Expression<TExpressionBody> expression)
-
-
-Example: ExpressionExtensions.GetMemberName(() => MyProperty)
-
-
-Other
+Nuget
-----
-* Build implementation of ContractAnnotation
-
-Completed Extensions
-====================
-
-Object Extensions
------------------
-* void EnsureIsNotNull(this object instance)
-* void EnsureIsNotNull(this object instance, string argumentName)
-* bool IsNotNull(this object instance)
-* bool IsNull(this object instance)
-
-
-Generic Extensions
------------------
-* T GetValueOrDefault<T>(this T item, T defaultValue) where T : class
-
-
-IEnumerable Extensions
-----------------------
-* bool IsNotEmpty<TItem>(this IEnumerable<TItem> items)
-* bool IsNullOrEmpty<TItem>(this IEnumerable<TItem> items)
-* IEnumerable<TItem> OrEmptyIfNull<TItem>(this IEnumerable<TItem> items)
-* IEnumerable<TItem> OrNullIfEmpty<TItem>(this IEnumerable<TItem> items)
-
-
-String Extensions
------------------
-* string FormatWith(this string format, params object[] parameters)
-* bool IsNotNullOrWhitespace(this String s)
-* bool IsNullOrWhitespace(this String s)
-* string ValueOrEmptyIfNull(this string value)
-* string ValueOrEmptyIfNullOrWhitespace(this string value)
-* string ValueOrIfNull(this string value, String replacement)
-* string ValueOrIfNullOrWhitespace(this string value, String replacement)
-* string ValueOrNullIfWhitespace(this string value)
-
-
-Type Extensions
----------------
-* bool IsOfType<T>(this object item)
-
-Array Extensions
-----------------------
-* void Clear<T>(this T[] items)
-* T[] OrNullIfEmpty<T>(this T[] items)
-* T[] OrEmptyIfNull<T>(this T[] items)
+You can install the nuget package using `Install-Package BCLExtensions` or by heading to the [Nuget Package Page](https://www.nuget.org/packages/BCLExtensions).
+Extensions
+----------
-Func Extensions
-----------------------
-* Action AsAction<T>(this Func<T> function)
-* Action AsActionUsing<TOutput, TParameter>(this Func<TParameter, TOutput> function, TParameter parameter)
-* Action AsActionUsing<TOutput, TParameter1, TParameter2>(this Func<TParameter1, TParameter2, TOutput> function, TParameter1 parameter1, TParameter2 parameter2)
+You can view the list if extensions available and future extensions to come on the [Extensions Wiki Page](https://github.com/csMACnz/BCLExtensions/wiki/Extensions).
diff --git a/build.tasks.ps1 b/build.tasks.ps1
index d40cab5..c1d5e2c 100644
--- a/build.tasks.ps1
+++ b/build.tasks.ps1
@@ -86,59 +86,25 @@ task build {
exec { msbuild "/t:Clean;Build" "/p:Configuration=$configuration" $sln_file }
}
-task appveyor-checkCoverity {
- if($env:APPVEYOR_SCHEDULED_BUILD -eq "True") {
- #download coverity
- Invoke-WebRequest -Uri "https://scan.coverity.com/download/cxx/win_64" -Body @{ project = "$env:APPVEYOR_REPO_NAME"; token = "$env:COVERITY_TOKEN" } -OutFile "$env:APPVEYOR_BUILD_FOLDER\coverity.zip"
-
- Expand-Archive .\coverity.zip
-
- $script:runCoverity = $true
- $script:covbuild = (Resolve-Path ".\cov-analysis-win64-*\bin\cov-build.exe").ToString()
- }
-}
-
task setup-coverity-local {
- $script:runCoverity = $true
- $script:covbuild = "cov-build"
$env:APPVEYOR_BUILD_FOLDER = "."
$env:APPVEYOR_BUILD_VERSION = $script:version
$env:APPVEYOR_REPO_NAME = "csmacnz/BCLExtensions"
- "You should have set the COVERITY_TOKEN environment variable already"
+ "You should have set the COVERITY_TOKEN and COVERITY_EMAILenvironment variable already"
+ $env:APPVEYOR_SCHEDULED_BUILD = "True"
}
task test-coverity -depends setup-coverity-local, coverity
-task coverity -precondition { return $script:runCoverity }{
- & $script:covbuild --dir cov-int msbuild "/t:Clean;Build" "/p:Configuration=$configuration" $sln_file
+task coverity -precondition { return $env:APPVEYOR_SCHEDULED_BUILD -eq "True" }{
$coverityFileName = "BCLExtensions.coverity.$script:nugetVersion.zip"
- Write-Zip -Path "cov-int" -OutputPath $coverityFileName
+ $PublishCoverity = (Resolve-Path ".\src\packages\PublishCoverity.*\PublishCoverity.exe").ToString()
+
+ & cov-build --dir cov-int msbuild "/t:Clean;Build" "/p:Configuration=$configuration" $sln_file
+
+ & $PublishCoverity compress -o $coverityFileName
- #TODO an app for this:
- Add-Type -AssemblyName "System.Net.Http"
- $client = New-Object Net.Http.HttpClient
- $client.Timeout = [TimeSpan]::FromMinutes(20)
- $form = New-Object Net.Http.MultipartFormDataContent
- [Net.Http.HttpContent]$formField = New-Object Net.Http.StringContent($env:COVERITY_TOKEN)
- $form.Add($formField, "token")
- $formField = New-Object Net.Http.StringContent($env:COVERITY_EMAIL)
- $form.Add($formField, "email")
- $fs = New-Object IO.FileStream("$env:APPVEYOR_BUILD_FOLDER\$coverityFileName", [IO.FileMode]::Open, [IO.FileAccess]::Read)
- $formField = New-Object Net.Http.StreamContent($fs)
- $form.Add($formField, "file", "$coverityFileName")
- $formField = New-Object Net.Http.StringContent($script:nugetVersion)
- $form.Add($formField, "version")
- $formField = New-Object Net.Http.StringContent("AppVeyor scheduled build ($env:APPVEYOR_BUILD_VERSION).")
- $form.Add($formField, "description")
- $url = "https://scan.coverity.com/builds?project=$env:APPVEYOR_REPO_NAME"
- $task = $client.PostAsync($url, $form)
- try {
- $task.Wait() # throws AggregateException on time-out
- } catch [AggregateException] {
- throw $_.Exception.InnerException
- }
- $task.Result
- $fs.Close()
+ & $PublishCoverity publish -t $env:COVERITY_TOKEN -e $env:COVERITY_EMAIL -z $coverityFileName -d "AppVeyor scheduled build ($env:APPVEYOR_BUILD_VERSION)." --codeVersion $script:nugetVersion
}
task coverage -depends LocalTestSettings, build, coverage-only
@@ -190,4 +156,4 @@ task appveyor-install -depends GitVersion, RestoreNuGetPackages
task appveyor-build -depends build
-task appveyor-test -depends AppVeyorEnvironmentSettings, postbuild, appveyor-checkCoverity, coverity
+task appveyor-test -depends AppVeyorEnvironmentSettings, postbuild, coverity
diff --git a/package.json b/package.json
deleted file mode 100644
index 89879c2..0000000
--- a/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "BCLExtensions",
- "version": "0.1.0",
- "description": "Base Class Library Extensions for C# base class library classes",
- "repository": {
- "type": "git",
- "url": "https://github.com/csmacnz/BCLExtensions.git"
- },
- "author": "csmacnz",
- "bugs": {
- "url": "https://github.com/csmacnz/BCLExtensions/issues"
- },
- "homepage": "https://github.com/csmacnz/BCLExtensions",
- "dependencies": {
- "gulp": "^3.8.10",
- "gulp-dotnet-assembly-info": "^0.1.10",
- "gulp-msbuild": "^0.2.4",
- "mstest": "^0.2.0"
- }
-}
diff --git a/src/.nuget/packages.config b/src/.nuget/packages.config
index 0e14aa1..53d3bca 100644
--- a/src/.nuget/packages.config
+++ b/src/.nuget/packages.config
@@ -1,6 +1,7 @@
-
+
+
diff --git a/src/BCLExtensions.Tests/ActionExtensions/AsActionUsingTests.cs b/src/BCLExtensions.Tests/ActionExtensions/AsActionUsingTests.cs
new file mode 100644
index 0000000..bfc006b
--- /dev/null
+++ b/src/BCLExtensions.Tests/ActionExtensions/AsActionUsingTests.cs
@@ -0,0 +1,61 @@
+using System;
+using Xunit;
+
+namespace BCLExtensions.Tests.ActionExtensions
+{
+
+ public class AsActionUsingTests
+ {
+ [Fact]
+ public void SampleActionIsValid()
+ {
+ Assert.DoesNotThrow(() => SampleAction(42));
+ }
+
+ [Fact]
+ public void ResultNotNull()
+ {
+ Action function = SampleAction;
+
+ var action = function.AsActionUsing(12);
+
+ Assert.NotNull(action);
+ }
+
+ private void SampleAction(int parameter)
+ {
+
+ }
+
+ [Fact]
+ public void InternalFunctionExecutes()
+ {
+ bool internalFunctionWasCalled = false;
+ Action action = parameter =>
+ {
+ internalFunctionWasCalled = true;
+ };
+ var result = action.AsActionUsing(12);
+ result();
+
+ Assert.True(internalFunctionWasCalled);
+ }
+
+
+ [Fact]
+ public void InternalFunctionCapturesCorrectParameter()
+ {
+ const int expectedParameter = 12;
+ int passedParameter = 0;
+ Action action = parameter =>
+ {
+ passedParameter = parameter;
+ };
+
+ var result = action.AsActionUsing(expectedParameter);
+ result();
+
+ Assert.Equal(expectedParameter, passedParameter);
+ }
+ }
+}
diff --git a/src/BCLExtensions.Tests/ActionExtensions/AsActionUsingWithThreeParametersTests.cs b/src/BCLExtensions.Tests/ActionExtensions/AsActionUsingWithThreeParametersTests.cs
new file mode 100644
index 0000000..54ca2b9
--- /dev/null
+++ b/src/BCLExtensions.Tests/ActionExtensions/AsActionUsingWithThreeParametersTests.cs
@@ -0,0 +1,69 @@
+using System;
+using Xunit;
+
+namespace BCLExtensions.Tests.ActionExtensions
+{
+
+ public class AsActionUsingWithThreeParametersTests
+ {
+ [Fact]
+ public void SampleActionIsValid()
+ {
+ Assert.DoesNotThrow(() => SampleAction(42, "Test", true));
+ }
+
+ [Fact]
+ public void ResultNotNull()
+ {
+ Action action = SampleAction;
+
+ var result = action.AsActionUsing(12, "12", false);
+
+ Assert.NotNull(result);
+ }
+
+ [Fact]
+ public void InternalActionExecutes()
+ {
+ bool internalActionWasCalled = false;
+ Action action = (p1,p2,p3) =>
+ {
+ internalActionWasCalled = true;
+ };
+ var result = action.AsActionUsing(12,"24", false);
+ result();
+
+ Assert.True(internalActionWasCalled);
+ }
+
+
+ [Fact]
+ public void InternalActionCapturesCorrectParameters()
+ {
+ const int expectedParameter1 = 12;
+ const string expectedParameter2 = "24";
+ const bool expectedParameter3 = true;
+ int passedParameter1 = 0;
+ string passedParameter2 = null;
+ bool passedParameter3 = false;
+ Action action = (p1,p2,p3) =>
+ {
+ passedParameter1 = p1;
+ passedParameter2 = p2;
+ passedParameter3 = p3;
+ };
+
+ var result = action.AsActionUsing(expectedParameter1, expectedParameter2, expectedParameter3);
+ result();
+
+ Assert.Equal(expectedParameter1, passedParameter1);
+ Assert.Equal(expectedParameter2, passedParameter2);
+ Assert.Equal(expectedParameter3, passedParameter3);
+ }
+
+ private void SampleAction(int parameter1, string parameter2, bool parameter3)
+ {
+ }
+
+ }
+}
diff --git a/src/BCLExtensions.Tests/ActionExtensions/AsActionUsingWithTwoParametersTests.cs b/src/BCLExtensions.Tests/ActionExtensions/AsActionUsingWithTwoParametersTests.cs
new file mode 100644
index 0000000..684d27f
--- /dev/null
+++ b/src/BCLExtensions.Tests/ActionExtensions/AsActionUsingWithTwoParametersTests.cs
@@ -0,0 +1,65 @@
+using System;
+using Xunit;
+
+namespace BCLExtensions.Tests.ActionExtensions
+{
+
+ public class AsActionUsingWithTwoParametersTests
+ {
+ [Fact]
+ public void SampleActionIsValid()
+ {
+ Assert.DoesNotThrow(() => SampleAction(42, "Test"));
+ }
+
+ [Fact]
+ public void ResultNotNull()
+ {
+ Action action = SampleAction;
+
+ var result = action.AsActionUsing(12, "12");
+
+ Assert.NotNull(result);
+ }
+
+ [Fact]
+ public void InternalActionExecutes()
+ {
+ bool internalActionWasCalled = false;
+ Action action = (p1,p2) =>
+ {
+ internalActionWasCalled = true;
+ };
+ var result = action.AsActionUsing(12,"24");
+ result();
+
+ Assert.True(internalActionWasCalled);
+ }
+
+
+ [Fact]
+ public void InternalActionCapturesCorrectParameters()
+ {
+ const int expectedParameter1 = 12;
+ const string expectedParameter2 = "24";
+ int passedParameter1 = 0;
+ string passedParameter2 = null;
+ Action action = (p1,p2) =>
+ {
+ passedParameter1 = p1;
+ passedParameter2 = p2;
+ };
+
+ var result = action.AsActionUsing(expectedParameter1, expectedParameter2);
+ result();
+
+ Assert.Equal(expectedParameter1, passedParameter1);
+ Assert.Equal(expectedParameter2, passedParameter2);
+ }
+
+ private void SampleAction(int parameter1, string parameter2)
+ {
+ }
+
+ }
+}
diff --git a/src/BCLExtensions.Tests/BCLExtensions.Tests.csproj b/src/BCLExtensions.Tests/BCLExtensions.Tests.csproj
index 0dac99d..b08c289 100644
--- a/src/BCLExtensions.Tests/BCLExtensions.Tests.csproj
+++ b/src/BCLExtensions.Tests/BCLExtensions.Tests.csproj
@@ -59,13 +59,37 @@
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
@@ -93,7 +117,6 @@
-
diff --git a/src/BCLExtensions.Tests/FuncExtensions/AsActionUsingWithThreeParametersTests.cs b/src/BCLExtensions.Tests/FuncExtensions/AsActionUsingWithThreeParametersTests.cs
new file mode 100644
index 0000000..1ae3e98
--- /dev/null
+++ b/src/BCLExtensions.Tests/FuncExtensions/AsActionUsingWithThreeParametersTests.cs
@@ -0,0 +1,72 @@
+using System;
+using Xunit;
+
+namespace BCLExtensions.Tests.FuncExtensions
+{
+
+ public class AsActionUsingWithThreeParametersTests
+ {
+ [Fact]
+ public void SampleFunctionIsValid()
+ {
+ Assert.DoesNotThrow(() => SampleFunction(42, "Test", true));
+ }
+
+ [Fact]
+ public void ResultNotNull()
+ {
+ Func function = SampleFunction;
+
+ var action = function.AsActionUsing(12, "12", false);
+
+ Assert.NotNull(action);
+ }
+
+ [Fact]
+ public void InternalFunctionExecutes()
+ {
+ bool internalFunctionWasCalled = false;
+ Func function = (p1,p2,p3) =>
+ {
+ internalFunctionWasCalled = true;
+ return 42m;
+ };
+ var action = function.AsActionUsing(12,"24",true);
+ action();
+
+ Assert.True(internalFunctionWasCalled);
+ }
+
+
+ [Fact]
+ public void InternalFunctionCapturesCorrectParameters()
+ {
+ const int expectedParameter1 = 12;
+ const string expectedParameter2 = "24";
+ const bool expectedParameter3 = true;
+ int passedParameter1 = 0;
+ string passedParameter2 = null;
+ bool passedParameter3 = false;
+ Func function = (p1,p2,p3) =>
+ {
+ passedParameter1 = p1;
+ passedParameter2 = p2;
+ passedParameter3 = p3;
+ return 42;
+ };
+
+ var action = function.AsActionUsing(expectedParameter1, expectedParameter2, expectedParameter3);
+ action();
+
+ Assert.Equal(expectedParameter1, passedParameter1);
+ Assert.Equal(expectedParameter2, passedParameter2);
+ Assert.Equal(expectedParameter3, passedParameter3);
+ }
+
+ private decimal SampleFunction(int parameter1, string parameter2, bool parameter3)
+ {
+ return 42m;
+ }
+
+ }
+}
diff --git a/src/BCLExtensions.Tests/FuncExtensions/AsActionUsingTests - Copy.cs b/src/BCLExtensions.Tests/FuncExtensions/AsActionUsingWithTwoParametersTests.cs
similarity index 100%
rename from src/BCLExtensions.Tests/FuncExtensions/AsActionUsingTests - Copy.cs
rename to src/BCLExtensions.Tests/FuncExtensions/AsActionUsingWithTwoParametersTests.cs
diff --git a/src/BCLExtensions.Tests/IntExtensions/EnsureOrderTests.cs b/src/BCLExtensions.Tests/IntExtensions/EnsureOrderTests.cs
new file mode 100644
index 0000000..6ab48da
--- /dev/null
+++ b/src/BCLExtensions.Tests/IntExtensions/EnsureOrderTests.cs
@@ -0,0 +1,44 @@
+using System;
+using BCLExtensions.Tests.TestHelpers;
+using Xunit;
+using Xunit.Extensions;
+
+namespace BCLExtensions.Tests.IntExtensions
+{
+ public class EnsureOrderTests
+ {
+ [Theory]
+ [InlineData(int.MaxValue, int.MinValue)]
+ [InlineData(1, 0)]
+ [InlineData(2, 1)]
+ [InlineData(3, 2)]
+ [InlineData(0, -1)]
+ [InlineData(-1, -2)]
+ [InlineData(-2, -3)]
+ [InlineData(42, -42)]
+ public void InvalidOrderThrowsExceptions(int first, int second)
+ {
+ Action ensureOrder = BCLExtensions.IntExtensions.EnsureOrder;
+
+ Assert.Throws(ensureOrder.AsActionUsing(first, second).AsThrowsDelegate());
+ }
+
+ [Theory]
+ [InlineData(0, 0)]
+ [InlineData(int.MinValue, int.MaxValue)]
+ [InlineData(0, 1)]
+ [InlineData(1, 2)]
+ [InlineData(2, 3)]
+ [InlineData(-1, 0)]
+ [InlineData(-2, -1)]
+ [InlineData(-3, -2)]
+ [InlineData(42, 42)]
+ [InlineData(-42, 42)]
+ public void ValidDataDoesNotThrowExceptions(int first, int second)
+ {
+ Action ensureOrder = BCLExtensions.IntExtensions.EnsureOrder;
+
+ Assert.DoesNotThrow(ensureOrder.AsActionUsing(first, second).AsThrowsDelegate());
+ }
+ }
+}
diff --git a/src/BCLExtensions.Tests/IntExtensions/IsBetweenExclusiveExclusiveTests.cs b/src/BCLExtensions.Tests/IntExtensions/IsBetweenExclusiveExclusiveTests.cs
new file mode 100644
index 0000000..b34741b
--- /dev/null
+++ b/src/BCLExtensions.Tests/IntExtensions/IsBetweenExclusiveExclusiveTests.cs
@@ -0,0 +1,48 @@
+using System;
+using BCLExtensions.Tests.TestHelpers;
+using Xunit;
+using Xunit.Extensions;
+
+namespace BCLExtensions.Tests.IntExtensions
+{
+ public class IsBetweenExclusiveExclusiveTests
+ {
+ [Theory]
+ [InlineData(0, -1, 1)]
+ [InlineData(0, int.MinValue, int.MaxValue)]
+ [InlineData(42, 30, 60)]
+ [InlineData(-30, -40, -20)]
+ public void InputToIsBetweenWithLimitsReturnsTrue(int input, int lowerLimit, int upperLimit)
+ {
+ var result = input.IsBetween(lowerLimit.Exclusive(), upperLimit.Exclusive());
+
+ Assert.True(result);
+ }
+
+ [Theory]
+ [InlineData(0, 0, 0)]
+ [InlineData(42, 42, 42)]
+ [InlineData(5, 5, 6)]
+ [InlineData(6, 5, 6)]
+ [InlineData(0, 1, 2)]
+ [InlineData(0, -2, -1)]
+ [InlineData(42, 5, 12)]
+ [InlineData(42, 50, 100)]
+ [InlineData(-30, -20, -10)]
+ [InlineData(-30, -50, -40)]
+ public void InputToIsBetweenWithLimitsReturnsFalse(int input, int lowerLimit, int upperLimit)
+ {
+ var result = input.IsBetween(lowerLimit.Exclusive(), upperLimit.Exclusive());
+
+ Assert.False(result);
+ }
+
+ [Fact]
+ public void LimitsAreReversedThrowsException()
+ {
+ Func isBetween = BCLExtensions.IntExtensions.IsBetween;
+
+ Assert.Throws(isBetween.AsActionUsing(0, 100.Exclusive(), 20.Exclusive()).AsThrowsDelegate());
+ }
+ }
+}
diff --git a/src/BCLExtensions.Tests/IntExtensions/IsBetweenExclusiveInclusiveTests.cs b/src/BCLExtensions.Tests/IntExtensions/IsBetweenExclusiveInclusiveTests.cs
new file mode 100644
index 0000000..195ad08
--- /dev/null
+++ b/src/BCLExtensions.Tests/IntExtensions/IsBetweenExclusiveInclusiveTests.cs
@@ -0,0 +1,48 @@
+using System;
+using BCLExtensions.Tests.TestHelpers;
+using Xunit;
+using Xunit.Extensions;
+
+namespace BCLExtensions.Tests.IntExtensions
+{
+ public class IsBetweenExclusiveInclusiveTests
+ {
+ [Theory]
+ [InlineData(0, -1, 1)]
+ [InlineData(6, 5, 6)]
+ [InlineData(0, int.MinValue, int.MaxValue)]
+ [InlineData(42, 30, 60)]
+ [InlineData(-30, -40, -20)]
+ public void InputToIsBetweenWithLimitsReturnsTrue(int input, int lowerLimit, int upperLimit)
+ {
+ var result = input.IsBetween(lowerLimit.Exclusive(), upperLimit.Inclusive());
+
+ Assert.True(result);
+ }
+
+ [Theory]
+ [InlineData(0, 0, 0)]
+ [InlineData(42, 42, 42)]
+ [InlineData(5, 5, 6)]
+ [InlineData(0, 1, 2)]
+ [InlineData(0, -2, -1)]
+ [InlineData(42, 5, 12)]
+ [InlineData(42, 50, 100)]
+ [InlineData(-30, -20, -10)]
+ [InlineData(-30, -50, -40)]
+ public void InputToIsBetweenWithLimitsReturnsFalse(int input, int lowerLimit, int upperLimit)
+ {
+ var result = input.IsBetween(lowerLimit.Exclusive(), upperLimit.Inclusive());
+
+ Assert.False(result);
+ }
+
+ [Fact]
+ public void LimitsAreReversedThrowsException()
+ {
+ Func isBetween = BCLExtensions.IntExtensions.IsBetween;
+
+ Assert.Throws(isBetween.AsActionUsing(0, 100.Exclusive(), 20.Inclusive()).AsThrowsDelegate());
+ }
+ }
+}
diff --git a/src/BCLExtensions.Tests/IntExtensions/IsBetweenExclusiveTests.cs b/src/BCLExtensions.Tests/IntExtensions/IsBetweenExclusiveTests.cs
new file mode 100644
index 0000000..843ac47
--- /dev/null
+++ b/src/BCLExtensions.Tests/IntExtensions/IsBetweenExclusiveTests.cs
@@ -0,0 +1,48 @@
+using System;
+using BCLExtensions.Tests.TestHelpers;
+using Xunit;
+using Xunit.Extensions;
+
+namespace BCLExtensions.Tests.IntExtensions
+{
+ public class IsBetweenExclusiveTests
+ {
+ [Theory]
+ [InlineData(0,-1,1)]
+ [InlineData(0,int.MinValue,int.MaxValue)]
+ [InlineData(42, 30, 60)]
+ [InlineData(-30, -40, -20)]
+ public void InputToIsBetweenWithLimitsReturnsTrue(int input, int lowerLimit, int upperLimit)
+ {
+ var result = input.IsBetweenExclusive(lowerLimit, upperLimit);
+
+ Assert.True(result);
+ }
+
+ [Theory]
+ [InlineData(0, 0, 0)]
+ [InlineData(42, 42, 42)]
+ [InlineData(5, 5, 6)]
+ [InlineData(6, 5, 6)]
+ [InlineData(0, 1, 2)]
+ [InlineData(0, -2, -1)]
+ [InlineData(42, 5, 12)]
+ [InlineData(42, 50, 100)]
+ [InlineData(-30, -20, -10)]
+ [InlineData(-30, -50, -40)]
+ public void InputToIsBetweenWithLimitsReturnsFalse(int input, int lowerLimit, int upperLimit)
+ {
+ var result = input.IsBetweenExclusive(lowerLimit, upperLimit);
+
+ Assert.False(result);
+ }
+
+ [Fact]
+ public void LimitsAreReversedThrowsException()
+ {
+ Func isBetween = BCLExtensions.IntExtensions.IsBetweenExclusive;
+
+ Assert.Throws(isBetween.AsActionUsing(0, 100, 20).AsThrowsDelegate());
+ }
+ }
+}
diff --git a/src/BCLExtensions.Tests/IntExtensions/IsBetweenInclusiveExclusiveTests.cs b/src/BCLExtensions.Tests/IntExtensions/IsBetweenInclusiveExclusiveTests.cs
new file mode 100644
index 0000000..9514591
--- /dev/null
+++ b/src/BCLExtensions.Tests/IntExtensions/IsBetweenInclusiveExclusiveTests.cs
@@ -0,0 +1,48 @@
+using System;
+using BCLExtensions.Tests.TestHelpers;
+using Xunit;
+using Xunit.Extensions;
+
+namespace BCLExtensions.Tests.IntExtensions
+{
+ public class IsBetweenInclusiveExclusiveTests
+ {
+ [Theory]
+ [InlineData(0, -1, 1)]
+ [InlineData(5, 5, 6)]
+ [InlineData(0, int.MinValue, int.MaxValue)]
+ [InlineData(42, 30, 60)]
+ [InlineData(-30, -40, -20)]
+ public void InputToIsBetweenWithLimitsReturnsTrue(int input, int lowerLimit, int upperLimit)
+ {
+ var result = input.IsBetween(lowerLimit.Inclusive(), upperLimit.Exclusive());
+
+ Assert.True(result);
+ }
+
+ [Theory]
+ [InlineData(0, 0, 0)]
+ [InlineData(42, 42, 42)]
+ [InlineData(6, 5, 6)]
+ [InlineData(0, 1, 2)]
+ [InlineData(0, -2, -1)]
+ [InlineData(42, 5, 12)]
+ [InlineData(42, 50, 100)]
+ [InlineData(-30, -20, -10)]
+ [InlineData(-30, -50, -40)]
+ public void InputToIsBetweenWithLimitsReturnsFalse(int input, int lowerLimit, int upperLimit)
+ {
+ var result = input.IsBetween(lowerLimit.Inclusive(), upperLimit.Exclusive());
+
+ Assert.False(result);
+ }
+
+ [Fact]
+ public void LimitsAreReversedThrowsException()
+ {
+ Func isBetween = BCLExtensions.IntExtensions.IsBetween;
+
+ Assert.Throws(isBetween.AsActionUsing(0, 100.Inclusive(), 20.Exclusive()).AsThrowsDelegate());
+ }
+ }
+}
diff --git a/src/BCLExtensions.Tests/IntExtensions/IsBetweenInclusiveInclusiveTests.cs b/src/BCLExtensions.Tests/IntExtensions/IsBetweenInclusiveInclusiveTests.cs
new file mode 100644
index 0000000..ab0e017
--- /dev/null
+++ b/src/BCLExtensions.Tests/IntExtensions/IsBetweenInclusiveInclusiveTests.cs
@@ -0,0 +1,48 @@
+using System;
+using BCLExtensions.Tests.TestHelpers;
+using Xunit;
+using Xunit.Extensions;
+
+namespace BCLExtensions.Tests.IntExtensions
+{
+ public class IsBetweenInclusiveInclusiveTests
+ {
+ [Theory]
+ [InlineData(0, 0, 0)]
+ [InlineData(42, 42, 42)]
+ [InlineData(5, 5, 6)]
+ [InlineData(6, 5, 6)]
+ [InlineData(0, -1, 1)]
+ [InlineData(0, int.MinValue, int.MaxValue)]
+ [InlineData(42, 30, 60)]
+ [InlineData(-30, -40, -20)]
+ public void InputToIsBetweenWithLimitsReturnsTrue(int input, int lowerLimit, int upperLimit)
+ {
+ var result = input.IsBetween(lowerLimit.Inclusive(), upperLimit.Inclusive());
+
+ Assert.True(result);
+ }
+
+ [Theory]
+ [InlineData(0, 1, 2)]
+ [InlineData(0, -2, -1)]
+ [InlineData(42, 5, 12)]
+ [InlineData(42, 50, 100)]
+ [InlineData(-30, -20, -10)]
+ [InlineData(-30, -50, -40)]
+ public void InputToIsBetweenWithLimitsReturnsFalse(int input, int lowerLimit, int upperLimit)
+ {
+ var result = input.IsBetween(lowerLimit.Inclusive(), upperLimit.Inclusive());
+
+ Assert.False(result);
+ }
+
+ [Fact]
+ public void LimitsAreReversedThrowsException()
+ {
+ Func isBetween = BCLExtensions.IntExtensions.IsBetween;
+
+ Assert.Throws(isBetween.AsActionUsing(0, 100.Inclusive(), 20.Inclusive()).AsThrowsDelegate());
+ }
+ }
+}
diff --git a/src/BCLExtensions.Tests/IntExtensions/IsBetweenTests.cs b/src/BCLExtensions.Tests/IntExtensions/IsBetweenTests.cs
new file mode 100644
index 0000000..1dd8a79
--- /dev/null
+++ b/src/BCLExtensions.Tests/IntExtensions/IsBetweenTests.cs
@@ -0,0 +1,48 @@
+using System;
+using BCLExtensions.Tests.TestHelpers;
+using Xunit;
+using Xunit.Extensions;
+
+namespace BCLExtensions.Tests.IntExtensions
+{
+ public class IsBetweenTests
+ {
+ [Theory]
+ [InlineData(0, 0, 0)]
+ [InlineData(42, 42, 42)]
+ [InlineData(5, 5, 6)]
+ [InlineData(6, 5, 6)]
+ [InlineData(0,-1,1)]
+ [InlineData(0,int.MinValue,int.MaxValue)]
+ [InlineData(42, 30, 60)]
+ [InlineData(-30, -40, -20)]
+ public void InputToIsBetweenWithLimitsReturnsTrue(int input, int lowerLimit, int upperLimit)
+ {
+ var result = input.IsBetween(lowerLimit, upperLimit);
+
+ Assert.True(result);
+ }
+
+ [Theory]
+ [InlineData(0, 1, 2)]
+ [InlineData(0, -2, -1)]
+ [InlineData(42, 5, 12)]
+ [InlineData(42, 50, 100)]
+ [InlineData(-30, -20, -10)]
+ [InlineData(-30, -50, -40)]
+ public void InputToIsBetweenWithLimitsReturnsFalse(int input, int lowerLimit, int upperLimit)
+ {
+ var result = input.IsBetween(lowerLimit, upperLimit);
+
+ Assert.False(result);
+ }
+
+ [Fact]
+ public void LimitsAreReversedThrowsException()
+ {
+ Func isBetween = BCLExtensions.IntExtensions.IsBetween;
+
+ Assert.Throws(isBetween.AsActionUsing(0, 100, 20).AsThrowsDelegate());
+ }
+ }
+}
diff --git a/src/BCLExtensions.Tests/ObjectExtensions/EnsureIsNotNullTests.cs b/src/BCLExtensions.Tests/ObjectExtensions/EnsureIsNotNullTests.cs
index d2956ac..cd3e16e 100644
--- a/src/BCLExtensions.Tests/ObjectExtensions/EnsureIsNotNullTests.cs
+++ b/src/BCLExtensions.Tests/ObjectExtensions/EnsureIsNotNullTests.cs
@@ -1,4 +1,5 @@
using System;
+using BCLExtensions.Tests.TestHelpers;
using Xunit;
namespace BCLExtensions.Tests.ObjectExtensions
@@ -11,7 +12,8 @@ public class EnsureIsNotNullTests
public void WhenInstanceIsNullThrowsException()
{
object instance = null;
- Assert.Throws(() => instance.EnsureIsNotNull());
+ Action