Esempio n. 1
0
        public async Task AddRecord()
        {
            Assert.Throws <ArgumentNullException>(() => client.AddRecord(null, new Identity()));
            Assert.Throws <ArgumentNullException>(() => client.AddRecord <Identity>(key, null));
            await client.AddRecord(key, data).ConfigureAwait(false);

            persistency.Verify(item => item.AddRecord(database.Object, key, data));
        }
Esempio n. 2
0
        public async Task TestLink()
        {
            var local = new Mock <IDatabaseAsync>();

            client = new RedisClient(new NullLogger <RedisClient>(), link.Object, mainIndexManager.Object, local.Object);
            await client.AddRecord(key, data).ConfigureAwait(false);

            persistency.Verify(item => item.AddRecord(local.Object, key, data));
        }