public async Task TestSubmitActionWorksForPoolRestart() { var poolRestartRequest = await Ledger.BuildPoolRestartRequestAsync(did, "cancel", null); poolRestartRequest = await Ledger.SignRequestAsync(wallet, did, poolRestartRequest); await Ledger.SubmitActionAsync(pool, poolRestartRequest, null, -1); }
public async Task TestBuildPoolRestartRequestWorksForCancelAction() { var expectedResult = string.Format("\"identifier\":\"{0}\"," + "\"operation\":{{\"type\":\"118\"," + "\"action\":\"cancel\"", DID); var request = await Ledger.BuildPoolRestartRequestAsync(DID, "cancel", null); Assert.IsTrue(request.Contains(expectedResult)); }
public async Task TestBuildPoolRestartRequestWorks() { var expectedResult = string.Format("\"identifier\":\"%s\"," + "\"operation\":{\"type\":\"118\"," + "\"action\":\"start\"," + "\"schedule\":{}", DID1); var action = "start"; var schedule = "{}"; var poolRestartRequest = await Ledger.BuildPoolRestartRequestAsync(DID1, action, schedule); Assert.IsTrue(poolRestartRequest.Replace("\\", "").Contains(expectedResult)); }