diff --git a/EasyAssertions.sln b/EasyAssertions.sln index 89dc88f..6eacc94 100644 --- a/EasyAssertions.sln +++ b/EasyAssertions.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 +# Visual Studio 15 +VisualStudioVersion = 15.0.26228.4 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyAssertions", "EasyAssertions\EasyAssertions.csproj", "{520003AC-48A4-40B6-AC33-DF5666AD6DFF}" EndProject @@ -12,6 +12,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EasyAssertions\EasyAssertions.nuspec = EasyAssertions\EasyAssertions.nuspec License.txt = License.txt Readme.md = Readme.md + ReleaseNotes.md = ReleaseNotes.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{6BE88110-6797-4C3B-8910-3E47DA86F3F7}" + ProjectSection(SolutionItems) = preProject + doc\Assertions.md = doc\Assertions.md + doc\CustomAssertions.md = doc\CustomAssertions.md + doc\Readme.md = doc\Readme.md EndProjectSection EndProject Global diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 02e011b..77d0a6a 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,12 @@ +# v2.1.0 +## New Features + - Enum assertions ([981787b](https://github.com/soxtoby/EasyAssertions/commit/981787b5b9f337ea471c4c42753221a9c4e38d67), [#5](https://github.com/soxtoby/EasyAssertions/issues/5)). + - `ShouldBeValue`, for asserting that value types are equal (mostly useful for enum IntelliSense) + - `ShouldHaveFlag`, for asserting that a flags enum has a particular flag. + +## Bug Fixes + - NuGet package includes XML documentation ([86d3b28](https://github.com/soxtoby/EasyAssertions/commit/86d3b28625be4c1b6f7b88021e290e806f2e7813), [#6](https://github.com/soxtoby/EasyAssertions/issues/6)). + # v2.0.1 ## Bug Fixes - Fixed null-ref in `ShouldFail` and `ShouldFailWith` when task is cancelled ([9e907db](https://github.com/soxtoby/EasyAssertions/commit/9e907db5ffed6d298b7c791dd3b6f9dbb0b12447), [#4](https://github.com/soxtoby/EasyAssertions/issues/4)). diff --git a/doc/Assertions.md b/doc/Assertions.md index 4a00c27..9ab25e5 100644 --- a/doc/Assertions.md +++ b/doc/Assertions.md @@ -13,6 +13,9 @@ Almost all assertions take in an optional message as their last parameter. (1.2).ShouldNotBe(1, 0.1); // not 1, with a tolerance of 0.1 double.NaN.ShouldBeNaN(); // also works for float.NaN (1.2).ShouldNotBeNaN(); + +// enums +MyEnum.Value.ShouldBeValue(MyEnum.Value); ``` # Reference Equality @@ -40,6 +43,11 @@ new object().ShouldNotBeNull(); "foo".ShouldMatch("f.+", RegexOptions.IgnoreCase); ``` +# Enums +```c# +(MyFlagsEnum.Flag1 | MyFlagsEnum.Flag2).ShouldHaveFlag(MyFlagsEnum.Flag1); +``` + # Comparables ```c# 2.ShouldBeGreaterThan(1);