protected override void RpcProcessRecord() { AccountManagerRpcReply reply = RpcClient.AccountManagerUpdateAsync(CancellationToken.None).GetAwaiter().GetResult(); if (reply.ErrorCode != ErrorCode.Success) { throw new Exception(string.Format("Account manager operation failed. Error code: {0}. Error message: {1}", reply.ErrorCode, string.Join(" ", reply.Messages))); } }
public async Task AccountManagerUpdate() { // An RpcFailureException will be thrown if not attached to any account manager RpcFailureException ex = await Assert.ThrowsExceptionAsync <RpcFailureException>(() => RpcClient.AccountManagerUpdateAsync(CancellationToken.None)); Assert.AreEqual("bad arg", ex.Message); }