public void TestRemoteAccountSetTx_Delegate(bool localSign) { _remote = new Remote(ServerUrl, localSign); var resetEvent = new AutoResetEvent(false); AccountSetTxResponse result = null; _remote.Connect(_ => { var options = new AccountSetTxOptions(); options.Account = "j9FGhAW9dSzL3RjbXkyW6Z6bHGxFk8cmB1"; options.Type = AccountSetType.Delegate; options.DelegateKey = "jMw3xrkX2ySwdQiEorymyuTLUSSa85wvSr"; var tx = _remote.BuildAccountSetTx(options); tx.SetSecret("ssGkkAMnKCBkhGVQd9CNzSQv5zdNi"); tx.AddMemo("Unit Test AccountSet (delegate) at " + DateTime.Now.ToString()); tx.Submit(r => { result = r.Result; resetEvent.Set(); }); }); Assert.IsTrue(resetEvent.WaitOne(DeferredWaitingTime)); Assert.IsNotNull(result); Assert.AreEqual("tesSUCCESS", result.EngineResult); }
public void TestRemoteAccountSetTx_Property(bool localSign) { _remote = new Remote(ServerUrl, localSign); var resetEvent = new AutoResetEvent(false); AccountSetTxResponse result = null; _remote.Connect(_ => { var options = new AccountSetTxOptions(); options.Account = "j9FGhAW9dSzL3RjbXkyW6Z6bHGxFk8cmB1"; options.Type = AccountSetType.Property; options.SetFlag = SetClearFlags.DisallowSWT; options.ClearFlag = SetClearFlags.NoFreeze; var tx = _remote.BuildAccountSetTx(options); tx.SetSecret("ssGkkAMnKCBkhGVQd9CNzSQv5zdNi"); tx.AddMemo("Unit Test AccountSet (property) at " + DateTime.Now.ToString()); tx.Submit(r => { result = r.Result; resetEvent.Set(); }); }); Assert.IsTrue(resetEvent.WaitOne(DeferredWaitingTime)); Assert.IsNotNull(result); Assert.AreEqual("tesSUCCESS", result.EngineResult); }