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)); }
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)); }