dupdobnightly - NFluent 3.0.0-beta-0250
NFluent is an ergonomic check library which aims to fluent your .NET TDD experience (based on simple Check.That() check statements). NFluent aims your tests to be fluent to write (with an happy 'dot' auto completion experience), fluent to read (i.e. as close as possible to plain English expression), but also fluent to troubleshoot, in a less-error-prone way comparing to the classical .NET test frameworks. NFluent is directly, but also freely, inspired by the awesome Java FEST fluent check/reflection library (http://fest.easytesting.org/).
PM> Install-Package NFluent -Version 3.0.0-beta-0250 -Source https://www.myget.org/F/dupdobnightly/api/v3/index.json
> nuget.exe install NFluent -Version 3.0.0-beta-0250 -Source https://www.myget.org/F/dupdobnightly/api/v3/index.json
> dotnet add package NFluent --version 3.0.0-beta-0250 --source https://www.myget.org/F/dupdobnightly/api/v3/index.json
source https://www.myget.org/F/dupdobnightly/api/v3/index.json
nuget NFluent ~> 3.0.0-beta-0250
Copy to clipboard
> choco install NFluent --version 3.0.0-beta-0250 --source https://www.myget.org/F/dupdobnightly/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "dupdobnightly" -SourceLocation "https://www.myget.org/F/dupdobnightly/api/v2"
Install-Module -Name "NFluent" -RequiredVersion "3.0.0-beta-0250" -Repository "dupdobnightly" -AllowPreRelease
Copy to clipboard
V 3.0.0
Major changes
- You can provide anonymous types and tuples when using IsEqualTo against any type. The check will be made against all
sut's propertie.
- Dropped support for Net Framework 2.0, 3.0, and 4.0. NFluent supports Net 3.5 SP1, Net. 4.5.2 +, Net Standard 1.3+ and Net Standard 2.0+.
If you can't upgrade your framework version to a supported one, please use NFluent 2.7.1.
Check.ThatEnum
has been removed. You must useCheck.That
instead.
New Checks
Is
: Checks if sut == expected. This is a strongly typed equivalent toIsEqualTo
.IsGreaterOrEqualThan
: Checks if sut >= expected.IsLessOrEqualThan
: Checks if sut <= expected.
New feautres
- You can provide custom comparer for any type, using
Check.RegisterComparer
like thisCheck.Register<MyType>(MyCustomComparer)
.
You can also use RegisterLocalComparer
to limit its usage to a declaration scope.
Breaking changes
- Equality logic changed for
IDictionary
: dictionaries are considered equals if they have the same keys and
the same values for each key. In NFluent V2, entries needed to be declared in the some order or else they were considered as different but equivalent.
You need to specify
IsAnInstanceOf<nullableType>(null)
now fails (with an appropriate message). Previously, it did succeed. But,
as captured in issue #68, this behavior was triggered by a bug and kept due to a poor error message when fixed.
- The
IStructCheck<T>
interface has been removed as well as associated extensibility helper. Those were dedicated
to value types
, you can migrate your existing extensions to the ICheck<T>
type instead. Please open an issue if
you need help.
Fixes
HasFieldWithSameValues resulted in false positive when string fields had the same value.
IsNotEqualTo now properly preserves expected type
Ilmproved rerporting of differences for enumerations and dictionaries to make them more consistent and fixed some inaccuracies.
GitHub Issues
- #325, #327, #330, #332
Obsolete
Here is the list of methods, classes and other obsolete stuff that have been removed in this version as well
as workaround advices.
Drop support for Net 2.0 and 3.0: keep using NFluent V2.x versions if you support for these.
ILambdaCheck
: the definition was kept to prevent breaking build, but it was no longer used. If this is a
problem for you, open an issue
IsPositive
(available for numbers): please useIsStrictlyPositive
instead.IsNegative
(available for numbers): please useIsStrictlyNegative
instead.IsLessThan
(available for numbers): please useIsStrictlyNegative
instead.IsGreaterThan
(available for numbers): please useIsStrictlyGreaterThan
instead.IsSameReferenceThan
: please useIsSameReferenceAs
instead.HasFieldsEqualToThose
: please useHasFieldsWithSameValues
instead.HasFieldsNotEqualToThose
: please useHasNotFieldsWithSameValues
instead.IsAFaillingCheckWithMessage
: please useIsAFailingCheckWithMessage
instead.IsAFaillingCheck
: please useIsAFailingCheck
instead.Properties
(available for enumeration): please useExtracting
instead.Checker.BuildLinkWhich
(used for custom extension): please useExtensibilityHelper.BuildCheckLinkWhich
instead.Checker.ExecuteCheckAndProvideSubItem
(used for custom extension): please 'ExtensibilityHelper' static class methods instead.
V 2.7.1
Fixes
- HasFieldsWithSameValues failed to properly compare when the expected value contained duplicate string.
More generally, instances where only checked once for equality; any subsequent check was assumed to be succesful.
This could lead to false positive (i.e. checks succeeded when it should have failed).
This regression was introduced by V 2.2.0 in 02/2018. Sorry about that.
GitHub Issues
- #331
- .NETFramework 3.5: 3.5.0.0
- .NETFramework 4.6: 4.6.0.0
- .NETStandard 2.0: 2.0.0.0
OwnersDupdob |
AuthorsThomas PIERRAIN, Cyrille DUPUYDAUBY, Rui CARVALHO, Marc-Antoine LATOUR |
Project URLhttp://www.n-fluent.net/ |
LicenseApache-2.0 |
Tagstdd bdd test fluent check checks easy nunit xunit mbunit mstestsucks |
Info262 total downloads |
23 downloads for version 3.0.0-beta-0250 |
Download (634.56 KB) |
Found on the current feed only |
Package history
Version | Size | Last updated | Downloads | Mirrored? | |||
---|---|---|---|---|---|---|---|
3.0.0-beta-0250 | 634.56 KB | Fri, 04 Feb 2022 15:10:23 GMT | 23 | ||||
3.0.0-beta-0246 | 640.28 KB | Wed, 13 Oct 2021 10:03:19 GMT | 21 | ||||
3.0.0-beta-0245 | 638.54 KB | Mon, 11 Oct 2021 21:43:04 GMT | 5 | ||||
3.0.0-beta-0244 | 638.07 KB | Mon, 11 Oct 2021 13:07:00 GMT | 3 | ||||
3.0.0-beta-0241 | 628.11 KB | Tue, 22 Jun 2021 07:44:49 GMT | 2 | ||||
3.0.0-beta-0238 | 774.62 KB | Tue, 16 Feb 2021 21:16:51 GMT | 64 | ||||
3.0.0-beta-0237 | 773.02 KB | Sat, 13 Feb 2021 15:06:07 GMT | 5 | ||||
3.0.0-beta-0236 | 764.76 KB | Sun, 24 Jan 2021 15:23:35 GMT | 5 | ||||
3.0.0-beta-0223 | 764.58 KB | Wed, 16 Dec 2020 21:28:20 GMT | 3 | ||||
3.0.0-beta-0222 | 761.9 KB | Thu, 22 Oct 2020 07:46:33 GMT | 7 | ||||
3.0.0-beta-0220 | 761.89 KB | Wed, 14 Oct 2020 07:22:28 GMT | 21 | ||||
3.0.0-beta-0216 | 761.89 KB | Tue, 13 Oct 2020 13:59:47 GMT | 19 | ||||
3.0.0-beta-0214 | 756.99 KB | Thu, 23 Jul 2020 07:02:28 GMT | 4 | ||||
2.7.0-beta-0213 | 1.44 MB | Wed, 29 Jan 2020 06:07:43 GMT | 19 | ||||
2.6.0-beta-0197 | 1.3 MB | Fri, 03 May 2019 07:05:26 GMT | 3 | ||||
2.5.1-beta-0194 | 1.24 MB | Fri, 22 Mar 2019 21:38:54 GMT | 5 | ||||
2.4.0-beta-0187 | 881.53 KB | Thu, 06 Sep 2018 20:18:31 GMT | 5 | ||||
2.4.0-beta-0186 | 881.49 KB | Thu, 06 Sep 2018 12:51:55 GMT | 5 | ||||
2.4.0-beta-0183 | 760.05 KB | Thu, 19 Jul 2018 15:57:18 GMT | 21 | ||||
2.4.0-beta-0182 | 758.11 KB | Wed, 18 Jul 2018 13:18:25 GMT | 22 |