Пример #1
0
        public void TestCanStoreAndRetrieveKeyFromKeyContainer()
        {
            var container = new KeyContainer();

            container.SetKey(new SigningKey
            {
                KeyId = "first"
            });
            var key = container.GetKey();

            Assert.AreEqual("first", key.KeyId);
        }
Пример #2
0
        public void TestStoringKeyReplacesOldOne()
        {
            var container = new KeyContainer();

            container.SetKey(new SigningKey
            {
                KeyId = "first"
            });
            container.SetKey(new SigningKey
            {
                KeyId = "second"
            });
            var key = container.GetKey();

            Assert.AreEqual("second", key.KeyId);
        }