public async Task Should_be_able_to_send_struct() { var request = DateTime.UtcNow; var requestType = typeof(DateTime); var responseType = typeof(long); rpc.RequestAsync <DateTime, long>(Arg.Any <DateTime>(), configure).Returns(42); var response = await rpc.RequestAsync(request, requestType, responseType, configure); response.Should().Be(42); #pragma warning disable 4014 rpc.Received() .RequestAsync <DateTime, long>( Arg.Is(request), Arg.Is(configure), Arg.Any <CancellationToken>() ); #pragma warning restore 4014 }