public async Task TestCreatePoolWorksForConfigJSON() { var genesisTxnFile = PoolUtils.CreateGenesisTxnFile("genesis.txn"); var path = Path.GetFullPath(genesisTxnFile.Name).Replace('\\', '/'); var configJson = string.Format("{{\"genesis_txn\":\"{0}\"}}", path); await Pool.CreatePoolLedgerConfigAsync("testCreatePoolWorks2", configJson); }
public async Task TestCreatePoolWorksForEmptyName() { var genesisTxnFile = PoolUtils.CreateGenesisTxnFile("genesis.txn"); var path = Path.GetFullPath(genesisTxnFile.Name).Replace('\\', '/'); var configJson = string.Format("{{\"genesis_txn\":\"{0}\"}}", path); var ex = await Assert.ThrowsExceptionAsync <ArgumentException>(() => Pool.CreatePoolLedgerConfigAsync(string.Empty, configJson) );; }
public async Task TestCreatePoolWorksForEmptyName() { var genesisTxnFile = PoolUtils.CreateGenesisTxnFile("genesis.txn"); var path = Path.GetFullPath(genesisTxnFile).Replace('\\', '/'); var configJson = string.Format("{{\"genesis_txn\":\"{0}\"}}", path); var ex = await Assert.ThrowsExceptionAsync <IndyException>(() => Pool.CreatePoolLedgerConfigAsync("", configJson) ); Assert.AreEqual(ErrorCode.CommonInvalidParam2, ex.ErrorCode); }