Skip to content

Commit af34b9c

Browse files
committed
delete mock
1 parent af0d5fa commit af34b9c

File tree

14 files changed

+2
-38
lines changed

14 files changed

+2
-38
lines changed

tests/NRedisStack.Tests/Bloom/BloomTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
using Xunit;
22
using StackExchange.Redis;
33
using NRedisStack.RedisStackCommands;
4-
using Moq;
54

65
namespace NRedisStack.Tests.Bloom;
76

87
public class BloomTests : AbstractNRedisStackTest, IDisposable
98
{
10-
Mock<IDatabase> _mock = new Mock<IDatabase>();
119
private readonly string key = "BLOOM_TESTS";
1210
public BloomTests(RedisFixture redisFixture) : base(redisFixture) { }
1311

tests/NRedisStack.Tests/CountMinSketch/CmsTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
using Xunit;
22
using StackExchange.Redis;
33
using NRedisStack.RedisStackCommands;
4-
using Moq;
54

65
namespace NRedisStack.Tests.CuckooFilter;
76

87
public class CmsTests : AbstractNRedisStackTest, IDisposable
98
{
10-
Mock<IDatabase> _mock = new Mock<IDatabase>();
119
private readonly string key = "CMS_TESTS";
1210
public CmsTests(RedisFixture redisFixture) : base(redisFixture) { }
1311

tests/NRedisStack.Tests/CuckooFilter/CuckooTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
using Xunit;
22
using StackExchange.Redis;
33
using NRedisStack.RedisStackCommands;
4-
using Moq;
54

65
namespace NRedisStack.Tests.CuckooFilter;
76

87
public class CuckooTests : AbstractNRedisStackTest, IDisposable
98
{
10-
Mock<IDatabase> _mock = new Mock<IDatabase>();
119
private readonly string key = "CUCKOO_TESTS";
1210
public CuckooTests(RedisFixture redisFixture) : base(redisFixture) { }
1311

tests/NRedisStack.Tests/Examples/ExampleTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.Net.Security;
22
using System.Security.Cryptography;
33
using System.Security.Cryptography.X509Certificates;
4-
using Moq;
54
using NRedisStack.DataTypes;
65
using NRedisStack.RedisStackCommands;
76
using NRedisStack.Search;
@@ -21,7 +20,6 @@ namespace NRedisStack.Tests;
2120
public class ExampleTests : AbstractNRedisStackTest, IDisposable
2221
{
2322
private readonly ITestOutputHelper testOutputHelper;
24-
Mock<IDatabase> _mock = new Mock<IDatabase>();
2523
private readonly string key = "EXAMPLES_TESTS";
2624
public ExampleTests(RedisFixture redisFixture, ITestOutputHelper testOutputHelper) : base(redisFixture)
2725
{

tests/NRedisStack.Tests/Gears/GearsTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
using Xunit;
22
using StackExchange.Redis;
3-
using Moq;
43

54
namespace NRedisStack.Tests.Gears;
65

76
public class GearsTests : AbstractNRedisStackTest, IDisposable
87
{
9-
Mock<IDatabase> _mock = new Mock<IDatabase>();
108
private readonly string key = "BLOOM_TESTS";
119
public GearsTests(RedisFixture redisFixture) : base(redisFixture) { }
1210

tests/NRedisStack.Tests/Graph/GraphTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
using Xunit;
22
using StackExchange.Redis;
33
using NRedisStack.RedisStackCommands;
4-
using Moq;
54
using NRedisStack.Graph;
65
using NRedisStack.Graph.DataTypes;
76

87
namespace NRedisStack.Tests.Graph;
98

109
public class GraphTests : AbstractNRedisStackTest, IDisposable
1110
{
12-
Mock<IDatabase> _mock = new Mock<IDatabase>();
1311
private readonly string key = "GRAPH_TESTS";
1412
public GraphTests(RedisFixture redisFixture) : base(redisFixture) { }
1513

tests/NRedisStack.Tests/Json/JsonTests.cs

-11
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
using System.Text.Json.Nodes;
33
using Xunit;
44
using StackExchange.Redis;
5-
using Moq;
65
using NRedisStack.RedisStackCommands;
76
using NRedisStack.Json.DataTypes;
87

98
namespace NRedisStack.Tests;
109

1110
public class JsonTests : AbstractNRedisStackTest, IDisposable
1211
{
13-
Mock<IDatabase> _mock = new Mock<IDatabase>();
1412
private readonly string _testName = "JSON_TESTS";
1513
public JsonTests(RedisFixture redisFixture) : base(redisFixture) { }
1614

@@ -100,15 +98,6 @@ public void TestSetFromDirectory()
10098
Directory.Delete("BaseDir", true);
10199
}
102100

103-
[Fact]
104-
public void TestJsonSetNotExist()
105-
{
106-
var obj = new Person { Name = "Shachar", Age = 23 };
107-
_mock.Setup(x => x.Execute(It.IsAny<string>(), It.IsAny<object[]>())).Returns((RedisResult.Create(new RedisValue("OK"))));
108-
_mock.Object.JSON().Set("Person:Shachar", "$", obj, When.NotExists);
109-
_mock.Verify(x => x.Execute("JSON.SET", "Person:Shachar", "$", "{\"Name\":\"Shachar\",\"Age\":23}", "NX"));
110-
}
111-
112101
[Fact]
113102
public void TestModulePrefixs()
114103
{

tests/NRedisStack.Tests/NRedisStack.Tests.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<PrivateAssets>all</PrivateAssets>
2121
</PackageReference>
2222
<PackageReference Include="dotenv.net" Version="3.1.2" />
23-
<PackageReference Include="Moq" Version="4.18.1" />
2423
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
2524
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
2625
<PackageReference Include="StackExchange.Redis" Version="2.6.96" />

tests/NRedisStack.Tests/PipelineTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
using Xunit;
22
using StackExchange.Redis;
33
using NRedisStack.RedisStackCommands;
4-
using Moq;
54
using System.Text.Json;
65
using NRedisStack.Search;
76

87
namespace NRedisStack.Tests;
98

109
public class PipelineTests : AbstractNRedisStackTest, IDisposable
1110
{
12-
Mock<IDatabase> _mock = new Mock<IDatabase>();
1311
private readonly string key = "PIPELINE_TESTS";
1412
public PipelineTests(RedisFixture redisFixture) : base(redisFixture) { }
1513

tests/NRedisStack.Tests/Search/SearchTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Xunit;
22
using StackExchange.Redis;
33
using NRedisStack.RedisStackCommands;
4-
using Moq;
54
using NRedisStack.Search;
65
using static NRedisStack.Search.Schema;
76
using NRedisStack.Search.Aggregation;
@@ -12,7 +11,6 @@ namespace NRedisStack.Tests.Search;
1211

1312
public class SearchTests : AbstractNRedisStackTest, IDisposable
1413
{
15-
Mock<IDatabase> _mock = new Mock<IDatabase>();
1614
// private readonly string key = "SEARCH_TESTS";
1715
private readonly string index = "TEST_INDEX";
1816
public SearchTests(RedisFixture redisFixture) : base(redisFixture) { }

tests/NRedisStack.Tests/Tdigest/TdigestTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
using Xunit;
22
using StackExchange.Redis;
33
using NRedisStack.RedisStackCommands;
4-
using Moq;
54

65
namespace NRedisStack.Tests.Tdigest;
76

87
public class TdigestTests : AbstractNRedisStackTest, IDisposable
98
{
10-
Mock<IDatabase> _mock = new Mock<IDatabase>();
119
private readonly string key = "TDIGEST_TESTS";
1210
public TdigestTests(RedisFixture redisFixture) : base(redisFixture) { }
1311

tests/NRedisStack.Tests/TimeSeries/TimeSeriesTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
using Xunit;
22
using StackExchange.Redis;
33
using NRedisStack.RedisStackCommands;
4-
using Moq;
54

65

76
namespace NRedisStack.Tests.TimeSeries;
87

98
public class TimeSeriesTests : AbstractNRedisStackTest, IDisposable
109
{
11-
Mock<IDatabase> _mock = new Mock<IDatabase>();
1210
private readonly string key = "TIME_SERIES_TESTS";
1311
public TimeSeriesTests(RedisFixture redisFixture) : base(redisFixture) { }
1412

tests/NRedisStack.Tests/TopK/TopKTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
using Xunit;
22
using StackExchange.Redis;
33
using NRedisStack.RedisStackCommands;
4-
using Moq;
54

65
namespace NRedisStack.Tests.TopK;
76

87
public class TopKTests : AbstractNRedisStackTest, IDisposable
98
{
10-
Mock<IDatabase> _mock = new Mock<IDatabase>();
119
private readonly string key = "TOPK_TESTS";
1210
public TopKTests(RedisFixture redisFixture) : base(redisFixture) { }
1311

tests/NRedisStack.Tests/TransactionsTests.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using Moq;
2-
using NRedisStack.RedisStackCommands;
1+
using NRedisStack.RedisStackCommands;
32
using NRedisStack.Search;
43
using StackExchange.Redis;
54
using System.Text.Json;
@@ -9,8 +8,7 @@ namespace NRedisStack.Tests
98
{
109
public class TransactionTests : AbstractNRedisStackTest, IDisposable
1110
{
12-
Mock<IDatabase> _mock = new Mock<IDatabase>();
13-
private readonly string key = "TRX_TESTS";
11+
private readonly string key = "TRX_TESTS";
1412
public TransactionTests(RedisFixture redisFixture) : base(redisFixture) { }
1513

1614
public void Dispose()

0 commit comments

Comments
 (0)