public void TearDown() { try { Ring.DeleteKeyring("keyring1"); Ring.SetDefaultKeyring("login"); } catch { // I don't care. } GC.Collect(); }
public void SetUp() { try { Ring.CreateKeyring("keyring1", "password"); } catch (KeyringException e) { if (e.ResultCode != ResultCode.AlreadyExists) { throw; } } Ring.SetDefaultKeyring("keyring1"); }
public void SetDefaultKeyringUpdatesGetDefaultKeyring() { string prevDefault = Ring.GetDefaultKeyring(); Ring.CreateKeyring("test1", "password"); try { Ring.SetDefaultKeyring("test1"); Assert.AreEqual("test1", Ring.GetDefaultKeyring()); } finally { Ring.DeleteKeyring("test1"); Ring.SetDefaultKeyring(prevDefault); } }
public void SetDefaultKeyringWithInvalidKeyringRaisesException() { Ring.SetDefaultKeyring("Keyring That Doesn't Exist"); }