【发布时间】:2019-01-10 16:49:41
【问题描述】:
可能是一个简单的,但不能让它工作;
我已将方法上的签名更改为 Task
在我的单元测试中,我使用流利的断言。
但无法让它工作:
_catalogVehicleMapper
.Invoking(m => m.MapToCatalogVehiclesAsync(searchResult, filtersInfo, request, default(CancellationToken)))
.Should().Throw<ArgumentException>()
.WithMessage("One of passed arguments has null value in mapping path and can not be mapped");
MapToCatalogVehiclesAsync 是异步方法,但我需要等待它,但等待和异步调用,似乎没有这样做..
有人..?
【问题讨论】:
标签: c# fluent-assertions