Skip to content

Commit

Permalink
remove moq
Browse files Browse the repository at this point in the history
  • Loading branch information
JFriel committed Sep 18, 2023
1 parent f34d00d commit bf81694
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion HICPluginTests/HICPluginTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NunitXml.TestLogger" Version="3.1.15" />
</ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion HICPluginTests/Integration/SCIStoreCacheDestinationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using SCIStorePlugin.Cache.Pipeline;
using SCIStorePlugin.Data;
using Tests.Common;
using NSubstitute;

namespace SCIStorePluginTests.Integration;

Expand Down Expand Up @@ -71,7 +72,7 @@ public void ProcessPipelineDataTest()
var deleteMe = LoadDirectory.CreateDirectoryStructure(new DirectoryInfo(TestContext.CurrentContext.WorkDirectory),"DeleteMe", true);
try
{
var fetchRequest = new Moq.Mock<ICacheFetchRequest>().Object;
var fetchRequest = Substitute.For<ICacheFetchRequest>();

var cacheChunk = new SCIStoreCacheChunk(new[] { report }, fetchDate, fetchRequest)
{
Expand Down
3 changes: 2 additions & 1 deletion HICPluginTests/TicketFactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Rdmp.Core.Ticketing;
using Rdmp.Core.ReusableLibraryCode.DataAccess;
using Tests.Common;
using NSubstitute;

namespace JiraPluginTests;

Expand All @@ -19,7 +20,7 @@ public void FactoryKnowsAboutJIRA()
[Test]
public void FactoryCreateAJIRA()
{
var credentials = new Moq.Mock<IDataAccessCredentials>().Object;
var credentials = Substitute.For<IDataAccessCredentials>();
Assert.DoesNotThrow(() => TicketingSystemFactory.Create(typeof(JIRATicketingSystem).FullName, "Bob", credentials));
}

Expand Down
3 changes: 2 additions & 1 deletion HICPluginTests/Unit/LimitedRetryThenContinueStrategyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using SCIStorePlugin.Data;
using SCIStorePlugin.DataProvider.RetryStrategies;
using SCIStorePlugin.Repositories;
using NSubstitute;

namespace SCIStorePluginTests.Unit;

Expand All @@ -13,7 +14,7 @@ public class LimitedRetryThenContinueStrategyTests
[Test]
public void Test()
{
var mockServer = new Moq.Mock<IRepositorySupportsDateRangeQueries<CombinedReportData>>().Object;
var mockServer = Substitute.For<IRepositorySupportsDateRangeQueries<CombinedReportData>>();

var strategy = new LimitedRetryThenContinueStrategy(5,new List<int>(new int[]{3,1}), mockServer);

Expand Down

0 comments on commit bf81694

Please sign in to comment.