で受信:NSubstitute私はAPI持っCONCRETE式<機能<T, bool>>
public async Task<Merchant> GetByExternalId(string externalId)
{
return await this.repository.GetBy(merchant => merchant.ExternalId == externalId);
}
をそして私はそれをテストしたい:
Expression<Func<Merchant, bool>> expression = merchant => merchant.ExternalId == externalId;
しかし、この:
repository.Received(1).GetBy(expression);
doesnの」仕事。
しかし、この作品:
repository.Received(1).GetBy(Arg.Any<Expression<Func<Merchant, bool>>>());
そして、どのように私はCONCRETE式に受信した試験ができますか?