Commit a6e99565 authored by Marc Gravell's avatar Marc Gravell

Merge branch 'master' into pipelines

# Conflicts:
#	src/StackExchange.Redis/Interfaces/IDatabase.cs
#	src/StackExchange.Redis/Interfaces/IDatabaseAsync.cs
#	src/StackExchange.Redis/RedisDatabase.cs
parents 0be51f49 80dd68f6
...@@ -989,7 +989,7 @@ public interface IDatabase : IRedis, IDatabaseAsync ...@@ -989,7 +989,7 @@ public interface IDatabase : IRedis, IDatabaseAsync
/// <param name="key">The key of the set.</param> /// <param name="key">The key of the set.</param>
/// <param name="count">The number of elements to return.</param> /// <param name="count">The number of elements to return.</param>
/// <param name="flags">The flags to use for this operation.</param> /// <param name="flags">The flags to use for this operation.</param>
/// <returns>The removed elements, or nil when key does not exist.</returns> /// <returns>An array of elements, or an empty array when key does not exist.</returns>
/// <remarks>https://redis.io/commands/spop</remarks> /// <remarks>https://redis.io/commands/spop</remarks>
RedisValue[] SetPop(RedisKey key, long count, CommandFlags flags = CommandFlags.None); RedisValue[] SetPop(RedisKey key, long count, CommandFlags flags = CommandFlags.None);
......
...@@ -953,7 +953,7 @@ public interface IDatabaseAsync : IRedisAsync ...@@ -953,7 +953,7 @@ public interface IDatabaseAsync : IRedisAsync
/// <param name="key">The key of the set.</param> /// <param name="key">The key of the set.</param>
/// <param name="count">The number of elements to return.</param> /// <param name="count">The number of elements to return.</param>
/// <param name="flags">The flags to use for this operation.</param> /// <param name="flags">The flags to use for this operation.</param>
/// <returns>The removed elements, or nil when key does not exist.</returns> /// <returns>An array of elements, or an empty array when key does not exist.</returns>
/// <remarks>https://redis.io/commands/spop</remarks> /// <remarks>https://redis.io/commands/spop</remarks>
Task<RedisValue[]> SetPopAsync(RedisKey key, long count, CommandFlags flags = CommandFlags.None); Task<RedisValue[]> SetPopAsync(RedisKey key, long count, CommandFlags flags = CommandFlags.None);
......
...@@ -563,7 +563,7 @@ public void SetMove() ...@@ -563,7 +563,7 @@ public void SetMove()
} }
[Fact] [Fact]
public void SetPop() public void SetPop_1()
{ {
wrapper.SetPop("key", CommandFlags.HighPriority); wrapper.SetPop("key", CommandFlags.HighPriority);
mock.Verify(_ => _.SetPop("prefix:key", CommandFlags.HighPriority)); mock.Verify(_ => _.SetPop("prefix:key", CommandFlags.HighPriority));
...@@ -572,6 +572,13 @@ public void SetPop() ...@@ -572,6 +572,13 @@ public void SetPop()
mock.Verify(_ => _.SetPop("prefix:key", 5, CommandFlags.HighPriority)); mock.Verify(_ => _.SetPop("prefix:key", 5, CommandFlags.HighPriority));
} }
[Fact]
public void SetPop_2()
{
wrapper.SetPop("key", 5, CommandFlags.HighPriority);
mock.Verify(_ => _.SetPop("prefix:key", 5, CommandFlags.HighPriority));
}
[Fact] [Fact]
public void SetRandomMember() public void SetRandomMember()
{ {
......
...@@ -535,7 +535,7 @@ public void SetMoveAsync() ...@@ -535,7 +535,7 @@ public void SetMoveAsync()
} }
[Fact] [Fact]
public void SetPopAsync() public void SetPopAsync_1()
{ {
wrapper.SetPopAsync("key", CommandFlags.HighPriority); wrapper.SetPopAsync("key", CommandFlags.HighPriority);
mock.Verify(_ => _.SetPopAsync("prefix:key", CommandFlags.HighPriority)); mock.Verify(_ => _.SetPopAsync("prefix:key", CommandFlags.HighPriority));
...@@ -544,6 +544,13 @@ public void SetPopAsync() ...@@ -544,6 +544,13 @@ public void SetPopAsync()
mock.Verify(_ => _.SetPopAsync("prefix:key", 5, CommandFlags.HighPriority)); mock.Verify(_ => _.SetPopAsync("prefix:key", 5, CommandFlags.HighPriority));
} }
[Fact]
public void SetPopAsync_2()
{
wrapper.SetPopAsync("key", 5, CommandFlags.HighPriority);
mock.Verify(_ => _.SetPopAsync("prefix:key", 5, CommandFlags.HighPriority));
}
[Fact] [Fact]
public void SetRandomMemberAsync() public void SetRandomMemberAsync()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment