Problem Statement
IsTypeOf returnss the typed value
IEnumerable<MyDto> returnedData = (await Assert.That(okResult.Value).IsTypeOf<IEnumerable<MyDto>>())!;
But the IsAssignableTo returns object instead of the typed value requiring 2 steps
await Assert.That(okResult.Value).IsAssignableTo<IEnumerable<MyDto>>();
IEnumerable<MyDto> returnedData = (IEnumerable<MyDto>)okResult.Value!;
Proposed Solution
return the typed value casted to the specified type.
Would also be good if in general would be possible to handle the nullability without requiring (await Assertion)! like the IsNotNull
Feature Category
Assertion
How important is this feature to you?
QoL
Problem Statement
IsTypeOf returnss the typed value
But the IsAssignableTo returns object instead of the typed value requiring 2 steps
Proposed Solution
return the typed value casted to the specified type.
Would also be good if in general would be possible to handle the nullability without requiring
(await Assertion)!like theIsNotNullFeature Category
Assertion
How important is this feature to you?
QoL