コード例 #1
0
        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);
        }
コード例 #2
0
        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)
                                                                           );;
        }
コード例 #3
0
ファイル: CreatePoolTest.cs プロジェクト: fsreyes/indy-sdk
        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);
        }