-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tests] Remove Moq as a dependency (#2522)
This is a test-only change. I don't want to risk an upgrade and harvesting PII from anyone who works on our project, so I'm removing Moq immediately. See https://github.com/moq/moq/issues/1372 for details/discussion.
- Loading branch information
1 parent
7e9b900
commit 2e6b2a8
Showing
6 changed files
with
776 additions
and
776 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
using Moq; | ||
using StackExchange.Redis.KeyspaceIsolation; | ||
using StackExchange.Redis.KeyspaceIsolation; | ||
using System.Text; | ||
using NSubstitute; | ||
using Xunit; | ||
|
||
namespace StackExchange.Redis.Tests; | ||
|
||
[Collection(nameof(MoqDependentCollection))] | ||
[Collection(nameof(SubstituteDependentCollection))] | ||
public sealed class KeyPrefixedBatchTests | ||
{ | ||
private readonly Mock<IBatch> mock; | ||
private readonly IBatch mock; | ||
private readonly KeyPrefixedBatch prefixed; | ||
|
||
public KeyPrefixedBatchTests() | ||
{ | ||
mock = new Mock<IBatch>(); | ||
prefixed = new KeyPrefixedBatch(mock.Object, Encoding.UTF8.GetBytes("prefix:")); | ||
mock = Substitute.For<IBatch>(); | ||
prefixed = new KeyPrefixedBatch(mock, Encoding.UTF8.GetBytes("prefix:")); | ||
} | ||
|
||
[Fact] | ||
public void Execute() | ||
{ | ||
prefixed.Execute(); | ||
mock.Verify(_ => _.Execute(), Times.Once()); | ||
mock.Received(1).Execute(); | ||
} | ||
} |
Oops, something went wrong.