public async Task SendTest() { var request = new CheckRequest(); m_ManagerMock.ClearSubstitute(); m_ManagerMock.Sign(request).Returns(request.GetType().Name); m_ManagerMock.Parse <CheckRequest>(null).ReturnsForAnyArgs((CheckRequest)null); var response = await m_Client.Send(request).ConfigureAwait(false); Received.InOrder(() => { m_ManagerMock.Sign(request); m_ManagerMock.Verify(Arg.Any <string>()); m_ManagerMock.Parse <CheckResponse>(Arg.Any <string>()); }); }
private async Task <TRes> sendCore <TReq, TRes>(Uri url, TReq request) where TRes : new() { var signedData = m_Manager.Sign(request); var responseTxt = await post(url, signedData).ConfigureAwait(false); m_Manager.Verify(responseTxt); return(m_Manager.Parse <TRes>(responseTxt)); }