public void ReplyTest([Values("Steem", "Golos")] string name) { var op = new ReplyOperation("steepshot", "Тест с русскими буквами", _login[name], "http://yt3.ggpht.com/-Z7aLVW1IhkQ/AAAAAAAAAAI/AAAAAAAAAAA/k54r-HgKdJc/s900-c-k-no-mo-rj-c0xffffff/photo.jpg фотачка и русский текст в придачу!", "{\"app\": \"steepshot / 0.0.4\", \"tags\": []}"); var prop = Manager(name).VerifyAuthority(_userPrivateKeys[name], op); //var prop = Manager(name).BroadcastOperations(_userPrivateKeys[name], op); Assert.IsFalse(prop.IsError, prop.GetErrorMessage()); }
public async Task ReplyTest() { var user = User; var op = new ReplyOperation("steepshot", "Тест с русскими буквами", user.Login, "http://yt3.ggpht.com/-Z7aLVW1IhkQ/AAAAAAAAAAI/AAAAAAAAAAA/k54r-HgKdJc/s900-c-k-no-mo-rj-c0xffffff/photo.jpg фотачка и русский текст в придачу!", GetMeta(null)); Assert.IsTrue(OperationHelper.TimePostfix.IsMatch(op.Permlink)); await Post(user.PostingKeys, false, op).ConfigureAwait(false); }
public void ReplyTest() { var user = User; var op = new ReplyOperation("steepshot", "Тест с русскими буквами", user.Login, "http://yt3.ggpht.com/-Z7aLVW1IhkQ/AAAAAAAAAAI/AAAAAAAAAAA/k54r-HgKdJc/s900-c-k-no-mo-rj-c0xffffff/photo.jpg фотачка и русский текст в придачу!", GetMeta(null)); Assert.IsTrue(OperationHelper.TimePostfix.IsMatch(op.Permlink)); var response = Post(user.PostingKeys, false, op); Assert.IsFalse(response.IsError, response.GetErrorMessage()); }
public override async Task Invoke(IOutgoingReplyContext context, Func <Task> next) { var sendOperation = new ReplyOperation { SenderEndpoint = endpointName, MessageId = context.MessageId, MessageType = context.Message.MessageType, MessageInstance = context.Message.Instance, MessageHeaders = context.Headers }; integrationContext.AddOutogingOperation(sendOperation); try { await next(); } catch (Exception sendError) { sendOperation.OperationError = sendError; throw; } }