public async Task Insert() { var list = new RedisList <int>(GlobalSettings.Default, "listkey4"); await list.Delete(); await list.RightPush(new[] { 1, 2, 3, 4, 5 }); (await list.Range()).Is(1, 2, 3, 4, 5); (await list.InsertBefore(4, 1000)).Is(6); (await list.Range()).Is(1, 2, 3, 1000, 4, 5); (await list.InsertAfter(4, 2000)).Is(7); (await list.Range()).Is(1, 2, 3, 1000, 4, 2000, 5); }
public async Task Insert() { var list = new RedisList<int>(GlobalSettings.Default, "listkey4"); await list.Delete(); await list.RightPush(new[] { 1, 2, 3, 4, 5 }); (await list.Range()).Is(1, 2, 3, 4, 5); (await list.InsertBefore(4, 1000)).Is(6); (await list.Range()).Is(1, 2, 3, 1000, 4, 5); (await list.InsertAfter(4, 2000)).Is(7); (await list.Range()).Is(1, 2, 3, 1000, 4, 2000, 5); }