Changed
New
-
Now targets netstandard2.1, as well as all the old favorites (#1658)
-
Enhanced support for
ValueTask
andValueTask<TResult>
, comparable to that forTask
andTask<TResult>
(#1658):- a
ValueTask
Dummy is an actual completedValueTask
- a
ValueTask<TResult>
Dummy is an actualValueTask<TResult>
that is already completed and whoseResult
is a Dummy of typeTResult
, or a defaultTResult
if no Dummy can be made forTResult
- unconfigured Fake methods that accept a cancellation token and return a
ValueTask
(orValueTask<T>
) will return a cancelled task object - new convenience overloads for configuring Fake methods that return
ValueTask
orValueTask<T>
:Returns
andReturnsLazily
let you specify a value rather than a task, which configures a method to return a completed task whose result is the specified valueThrowsAsync
lets you configure a method to return a failed task whoseException
property is set to the given exception
If your test project targets a framework compatible with .NET Standard 2.1 or higher, these last two features are available in the FakeItEasy package itself. Otherwise, you can access them by referencing the new FakeItEasy.Extensions.ValueType NuGet package.
- a
-
Analyzers now target .NET Standard 2.0 (#1667)