diff --git a/NRedisTimeSeries.Test/TestAPI/TestMRange.cs b/NRedisTimeSeries.Test/TestAPI/TestMRange.cs index 687149f..d402c61 100644 --- a/NRedisTimeSeries.Test/TestAPI/TestMRange.cs +++ b/NRedisTimeSeries.Test/TestAPI/TestMRange.cs @@ -181,12 +181,12 @@ public void TestMRangeAlign() new TimeSeriesTuple(50,1), new TimeSeriesTuple(100,1) }; - var results = db.TimeSeriesMRange("-", "+", new List { "key=MRangeAlign" }, align: "-", aggregation: TsAggregation.Count, timeBucket: 10, count:3); + var results = db.TimeSeriesMRange(0, "+", new List { "key=MRangeAlign" }, align: "-", aggregation: TsAggregation.Count, timeBucket: 10, count:3); Assert.Equal(1, results.Count); Assert.Equal(keys[0], results[0].key); Assert.Equal(expected, results[0].values); - results = db.TimeSeriesMRange("-", "+", new List { "key=MRangeAlign" }, align: "+", aggregation: TsAggregation.Count, timeBucket: 10, count:1); - Assert.Equal(new TimeSeriesTuple(-3,1), results[0].values[0]); + results = db.TimeSeriesMRange(1, 500, new List { "key=MRangeAlign" }, align: "+", aggregation: TsAggregation.Count, timeBucket: 10, count:1); + Assert.Equal(expected[1], results[0].values[0]); } [Fact] diff --git a/NRedisTimeSeries.Test/TestAPI/TestMRangeAsync.cs b/NRedisTimeSeries.Test/TestAPI/TestMRangeAsync.cs index cbd956a..7ebdbf1 100644 --- a/NRedisTimeSeries.Test/TestAPI/TestMRangeAsync.cs +++ b/NRedisTimeSeries.Test/TestAPI/TestMRangeAsync.cs @@ -184,12 +184,12 @@ public async Task TestMRangeAlign() new TimeSeriesTuple(50,1), new TimeSeriesTuple(100,1) }; - var results = await db.TimeSeriesMRangeAsync("-", "+", new List { $"{keys[0]}=value" }, align: "-", aggregation: TsAggregation.Count, timeBucket: 10, count:3); + var results = await db.TimeSeriesMRangeAsync(0, "+", new List { $"{keys[0]}=value" }, align: "-", aggregation: TsAggregation.Count, timeBucket: 10, count:3); Assert.Equal(1, results.Count); Assert.Equal(keys[0], results[0].key); Assert.Equal(expected, results[0].values); - results = await db.TimeSeriesMRangeAsync("-", "+", new List { $"{keys[0]}=value" }, align: "+", aggregation: TsAggregation.Count, timeBucket: 10, count:1); - Assert.Equal(new TimeSeriesTuple(-3,1), results[0].values[0]); + results = await db.TimeSeriesMRangeAsync(0, 500, new List { $"{keys[0]}=value" }, align: "+", aggregation: TsAggregation.Count, timeBucket: 10, count:1); + Assert.Equal(expected[0], results[0].values[0]); } [Fact] diff --git a/NRedisTimeSeries.Test/TestAPI/TestMRevRange.cs b/NRedisTimeSeries.Test/TestAPI/TestMRevRange.cs index 1d5b72f..6b5107c 100644 --- a/NRedisTimeSeries.Test/TestAPI/TestMRevRange.cs +++ b/NRedisTimeSeries.Test/TestAPI/TestMRevRange.cs @@ -175,12 +175,12 @@ public void TestMRevRangeAlign() new TimeSeriesTuple(400,1), new TimeSeriesTuple(350,1) }; - var results = db.TimeSeriesMRevRange("-", "+", new List { $"{keys[0]}=value" }, align: "-", aggregation: TsAggregation.Count, timeBucket: 10, count:3); + var results = db.TimeSeriesMRevRange(0, "+", new List { $"{keys[0]}=value" }, align: "-", aggregation: TsAggregation.Count, timeBucket: 10, count:3); Assert.Equal(1, results.Count); Assert.Equal(keys[0], results[0].key); Assert.Equal(expected, results[0].values); - results = db.TimeSeriesMRevRange("-", "+", new List { $"{keys[0]}=value" }, align: "+", aggregation: TsAggregation.Count, timeBucket: 10, count:1); - Assert.Equal(new TimeSeriesTuple(450-3,1), results[0].values[0]); + results = db.TimeSeriesMRevRange(0, 500, new List { $"{keys[0]}=value" }, align: "+", aggregation: TsAggregation.Count, timeBucket: 10, count:1); + Assert.Equal(expected[0], results[0].values[0]); } [Fact] diff --git a/NRedisTimeSeries.Test/TestAPI/TestMRevRangeAsync.cs b/NRedisTimeSeries.Test/TestAPI/TestMRevRangeAsync.cs index ebf3514..5105408 100644 --- a/NRedisTimeSeries.Test/TestAPI/TestMRevRangeAsync.cs +++ b/NRedisTimeSeries.Test/TestAPI/TestMRevRangeAsync.cs @@ -175,12 +175,12 @@ public async Task TestMRevRangeAlign() new TimeSeriesTuple(400,1), new TimeSeriesTuple(350,1) }; - var results = await db.TimeSeriesMRevRangeAsync("-", "+", new List { $"{keys[0]}=value" }, align: "-", aggregation: TsAggregation.Count, timeBucket: 10, count:3); + var results = await db.TimeSeriesMRevRangeAsync(0, "+", new List { $"{keys[0]}=value" }, align: "-", aggregation: TsAggregation.Count, timeBucket: 10, count:3); Assert.Equal(1, results.Count); Assert.Equal(keys[0], results[0].key); Assert.Equal(expected, results[0].values); - results = await db.TimeSeriesMRevRangeAsync("-", "+", new List { $"{keys[0]}=value" }, align: "+", aggregation: TsAggregation.Count, timeBucket: 10, count:1); - Assert.Equal(new TimeSeriesTuple(450-3,1), results[0].values[0]); + results = await db.TimeSeriesMRevRangeAsync(0, 500, new List { $"{keys[0]}=value" }, align: "+", aggregation: TsAggregation.Count, timeBucket: 10, count:1); + Assert.Equal(expected[0], results[0].values[0]); } [Fact]