Skip to content

Commit

Permalink
Merge branch 'nsubstitute' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiringWorm committed Aug 27, 2024
2 parents 29d2807 + f4c3f63 commit f9709f4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
6 changes: 5 additions & 1 deletion src/Cake.Transifex.Tests/Cake.Transifex.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.17">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="Cake.Testing" Version="3.0.0" />
Expand Down
36 changes: 18 additions & 18 deletions src/Cake.Transifex.Tests/TransifexRunnerFixture.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
namespace Cake.Transifex.Tests
namespace Cake.Transifex.Tests
{
using Cake.Core;
using Cake.Core.IO;
using Cake.Testing;
using Cake.Testing.Fixtures;
using Moq;
using NSubstitute;

public class TransifexAliasesInitFixture : TransifexInitFixture
{
private static ICakeContext _context;

public TransifexAliasesInitFixture()
{
var argumentsMoq = new Mock<ICakeArguments>();
var registryMoq = new Mock<IRegistry>();
var dataService = new Mock<ICakeDataService>();
_context = new CakeContext(FileSystem, Environment, Globber, new FakeLog(), argumentsMoq.Object, ProcessRunner, registryMoq.Object, Tools, dataService.Object, Configuration);
var argumentsMoq = Substitute.For<ICakeArguments>();
var registryMoq = Substitute.For<IRegistry>();
var dataService = Substitute.For<ICakeDataService>();
_context = new CakeContext(FileSystem, Environment, Globber, new FakeLog(), argumentsMoq, ProcessRunner, registryMoq, Tools, dataService, Configuration);
}

protected override void RunTool()
Expand All @@ -37,10 +37,10 @@ public class TransifexAliasesPullFixture : TransifexPullFixture

public TransifexAliasesPullFixture()
{
var argumentsMoq = new Mock<ICakeArguments>();
var registryMoq = new Mock<IRegistry>();
var dataService = new Mock<ICakeDataService>();
_context = new CakeContext(FileSystem, Environment, Globber, new FakeLog(), argumentsMoq.Object, ProcessRunner, registryMoq.Object, Tools, dataService.Object, Configuration);
var argumentsMoq = Substitute.For<ICakeArguments>();
var registryMoq = Substitute.For<IRegistry>();
var dataService = Substitute.For<ICakeDataService>();
_context = new CakeContext(FileSystem, Environment, Globber, new FakeLog(), argumentsMoq, ProcessRunner, registryMoq, Tools, dataService, Configuration);
}

protected override void RunTool()
Expand All @@ -62,10 +62,10 @@ public class TransifexAliasesPushFixture : TransifexPushFixture

public TransifexAliasesPushFixture()
{
var argumentsMoq = new Mock<ICakeArguments>();
var registryMoq = new Mock<IRegistry>();
var dataService = new Mock<ICakeDataService>();
_context = new CakeContext(FileSystem, Environment, Globber, new FakeLog(), argumentsMoq.Object, ProcessRunner, registryMoq.Object, Tools, dataService.Object, Configuration);
var argumentsMoq = Substitute.For<ICakeArguments>();
var registryMoq = Substitute.For<IRegistry>();
var dataService = Substitute.For<ICakeDataService>();
_context = new CakeContext(FileSystem, Environment, Globber, new FakeLog(), argumentsMoq, ProcessRunner, registryMoq, Tools, dataService, Configuration);
}

protected override void RunTool()
Expand All @@ -87,10 +87,10 @@ public class TransifexAliasesStatusFixture : TransifexStatusFixture

public TransifexAliasesStatusFixture()
{
var argumentsMoq = new Mock<ICakeArguments>();
var registryMoq = new Mock<IRegistry>();
var dataService = new Mock<ICakeDataService>();
_context = new CakeContext(FileSystem, Environment, Globber, new FakeLog(), argumentsMoq.Object, ProcessRunner, registryMoq.Object, Tools, dataService.Object, Configuration);
var argumentsMoq = Substitute.For<ICakeArguments>();
var registryMoq = Substitute.For<IRegistry>();
var dataService = Substitute.For<ICakeDataService>();
_context = new CakeContext(FileSystem, Environment, Globber, new FakeLog(), argumentsMoq, ProcessRunner, registryMoq, Tools, dataService, Configuration);
}

protected override void RunTool()
Expand Down

0 comments on commit f9709f4

Please sign in to comment.