Ejemplo n.º 1
0
        public async Task RegenerateKeyTest()
        {
            List <ApiKey> keys = await ConfigStore.GetKeysAsync().ToEnumerableAsync();

            ApiKey orignalKey = keys.FirstOrDefault();

            RegenerateKeyOptions regenerateKeyOptions = new RegenerateKeyOptions()
            {
                Id = orignalKey.Id
            };
            ApiKey configurationStore = await ConfigStore.RegenerateKeyAsync(regenerateKeyOptions);

            keys = await ConfigStore.GetKeysAsync().ToEnumerableAsync();

            Assert.IsTrue(keys.Where(x => x.Name == orignalKey.Name).FirstOrDefault().Value != orignalKey.Value);
        }
Ejemplo n.º 2
0
        public async Task GetKeysTest()
        {
            List <ApiKey> keys = await ConfigStore.GetKeysAsync().ToEnumerableAsync();

            Assert.IsTrue(keys.Count >= 1);
        }