public async Task ListIndex()
        {
            key.AddIndex(new IndexKey("Test", false));
            await instance.AddRecord(database.Object, key, data).ConfigureAwait(false);

            database.Verify(item => item.HashSetAsync(It.IsAny <RedisKey>(), It.IsAny <HashEntry[]>(), CommandFlags.None), Times.Exactly(1));
            redisSetList.Verify(item => item.SaveItems(database.Object, It.IsAny <IDataKey>(), It.IsAny <RedisValue[]>()));
        }
예제 #2
0
        public void AddIndex()
        {
            var key = new ObjectKey("Test");

            Assert.Throws <ArgumentNullException>(() => key.AddIndex(null));
            key.AddIndex(new IndexKey("Test", false));
            Assert.AreEqual(1, key.Indexes.Length);
        }