Fluent Assertions is a .NET library for assertions of any kind, but I cannot get it to work with PowerShell. Is it possible at all?
I used Add-Type cmdlet to add the library's DLLs and tried the following example:
PS C:\Users\ymm> $test = 'test string'
PS C:\Users\ymm> $test.[FluentAssertions.AssertionExtensions]::Should().BeNull()
But got the following error:
Cannot find an overload for "Should" and the argument count: "0".
At line:1 char:1
+ $test.[FluentAssertions.AssertionExtensions]::Should().BeNull()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodException
+ FullyQualifiedErrorId : MethodCountCouldNotFindBest