message: Gets OpenWalletTest working
diff: @@ -7,56 +7,56 @@ namespace Hyperledger.Indy.Test.WalletTests
  [TestClass]
  public class OpenWalletTest : IndyIntegrationTestBase
  {
  - [TestMethod]
  - public async Task TestOpenWalletWorks()
  - {
  - var walletName = "openWalletWorks";
  -
  - await Wallet.CreateWalletAsync(POOL, walletName, TYPE, null, null);
  - var wallet = await Wallet.OpenWalletAsync(walletName, null, null);
  -
  - Assert.IsNotNull(wallet);
  - }
  + private const string OPEN_WALLET_NAME = "OpenWallet";
  + private Wallet _openWallet = null;
  - [TestMethod]
  - public async Task TestOpenWalletWorksForConfig()
  + [TestCleanup]
  + public async Task CleanupWallet()
  {
  - var walletName = "openWalletWorksForConfig";
  + if (null == _openWallet) return;
  - await Wallet.CreateWalletAsync(POOL, walletName, TYPE, null, null);
  - var wallet = await Wallet.OpenWalletAsync(walletName, "{\"freshness_time\":1000}", null);
  + try
  + {
  + _openWallet.CloseAsync();
  + _openWallet.Dispose();
  - Assert.IsNotNull(wallet);
  + } catch {} // eat the exceptions
  }
  [TestMethod]
  - public async Task TestOpenWalletWorksForPlugged()
  + public async Task TestOpenWalletWorks()
  {
  - var walletName = "testOpenWalletWorksForPlugged";
  + WalletConfig config = new WalletConfig() { id = OPEN_WALLET_NAME };
  + Credentials cred = new Credentials() { key = WALLET_KEY };
  - await Wallet.CreateWalletAsync(POOL, walletName, "inmem", null, null);
  - var wallet = await Wallet.OpenWalletAsync(walletName, null, null);
  - Assert.IsNotNull(wallet);
  + await Wallet.CreateWalletAsync(config, cred);
  + _openWallet = await Wallet.OpenWalletAsync(config, cred);
  +
  + Assert.IsNotNull(_openWallet);
  }
  [TestMethod]
  public async Task TestOpenWalletWorksForNotCreated()
  {
  - var ex = await Assert.ThrowsExceptionAsync<IOException>(() =>
  - Wallet.OpenWalletAsync("testOpenWalletWorksForNotCreated", null, null)
  + WalletConfig config = new WalletConfig() { id = OPEN_WALLET_NAME };
  + Credentials cred = new Credentials() { key = WALLET_KEY };
  +
  + var ex = await Assert.ThrowsExceptionAsync<WalletValueNotFoundException>(() =>
  + Wallet.OpenWalletAsync(config, cred)
  );
  }
  [TestMethod]
  public async Task TestOpenWalletWorksForTwice()
  {
  - var walletName = "openWalletWorksForTwice";
  + WalletConfig config = new WalletConfig() { id = OPEN_WALLET_NAME };
  + Credentials cred = new Credentials() { key = WALLET_KEY };
  - await Wallet.CreateWalletAsync(POOL, walletName, TYPE, null, null);
  - var wallet = await Wallet.OpenWalletAsync(walletName, null, null);
  + await Wallet.CreateWalletAsync(config, cred);
  + _openWallet = await Wallet.OpenWalletAsync(config, cred);
  var ex = await Assert.ThrowsExceptionAsync<WalletAlreadyOpenedException>(() =>
  - Wallet.OpenWalletAsync(walletName, null, null)
  + Wallet.OpenWalletAsync(config, cred)
  );
  }
  