This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2335 from ianco/rc
Merge latest master, including indy node dockerfile updates
- Loading branch information
Showing
4 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
wrappers/java/src/test/java/org/hyperledger/indy/sdk/pool/ListPoolsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.hyperledger.indy.sdk.pool; | ||
|
||
import org.hyperledger.indy.sdk.IndyIntegrationTest; | ||
import org.hyperledger.indy.sdk.utils.PoolUtils; | ||
|
||
import org.junit.Test; | ||
import org.json.JSONArray; | ||
|
||
import java.io.File; | ||
|
||
import static org.junit.Assert.assertTrue; | ||
import static org.junit.Assert.assertEquals; | ||
|
||
public class ListPoolsTest extends IndyIntegrationTest { | ||
|
||
@Test | ||
public void testListPoolsWorks() throws Exception { | ||
File file = new File("testListPoolsWorks.txn"); | ||
file.deleteOnExit(); | ||
assertTrue(file.createNewFile()); | ||
PoolUtils.writeTransactions(file); | ||
|
||
String testPoolName = "testListPoolsWorks"; | ||
|
||
Pool.createPoolLedgerConfig(testPoolName, null).get(); | ||
String listPoolsJson = Pool.listPools().get(); | ||
|
||
JSONArray listPools = new JSONArray(listPoolsJson); | ||
|
||
assertEquals(1, listPools.length()); | ||
assertEquals(testPoolName, listPools.getJSONObject(0).getString("pool")); | ||
} | ||
|
||
} |