Skip to content

Commit

Permalink
(cake-buildGH-694) Added tests for ILRepack
Browse files Browse the repository at this point in the history
  • Loading branch information
gep13 committed Feb 21, 2016
1 parent 93755ff commit 2b6c950
Show file tree
Hide file tree
Showing 4 changed files with 576 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Cake.Common.Tests/Cake.Common.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
<Compile Include="Fixtures\Tools\GitReleaseNotesRunnerFixture.cs" />
<Compile Include="Fixtures\Tools\ILMergeRunnerFixture.cs" />
<Compile Include="Fixtures\Diagnostics\LogActionFixture.cs" />
<Compile Include="Fixtures\Tools\ILRepackRunnerFixture.cs" />
<Compile Include="Fixtures\Tools\InspectCode\InspectCodeFixture.cs" />
<Compile Include="Fixtures\Tools\InspectCode\InspectCodeRunFixture.cs" />
<Compile Include="Fixtures\Tools\InspectCode\InspectCodeRunFromConfigFixture.cs" />
Expand Down Expand Up @@ -223,6 +224,8 @@
<Compile Include="Unit\IO\ZipperTests.cs" />
<Compile Include="Unit\IO\DirectoryAliasesTests.cs" />
<Compile Include="Unit\IO\FileAliasesTests.cs" />
<Compile Include="Unit\Tools\ILRepack\ILRepackRunnerTests.cs" />
<Compile Include="Unit\Tools\ILRepack\ILRepackSettingsTests.cs" />
<Compile Include="Unit\Tools\InspectCode\InspectCodeRunnerTests.cs" />
<Compile Include="Unit\Tools\DotNetBuildSettingsExtensionsTests.cs" />
<Compile Include="Unit\Tools\DotNetBuildSettingsTests.cs" />
Expand Down
28 changes: 28 additions & 0 deletions src/Cake.Common.Tests/Fixtures/Tools/ILRepackRunnerFixture.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System.Collections.Generic;
using Cake.Common.Tools.ILRepack;
using Cake.Core.IO;
using Cake.Testing.Fixtures;

namespace Cake.Common.Tests.Fixtures.Tools
{
internal sealed class ILRepackRunnerFixture : ToolFixture<ILRepackSettings>
{
public FilePath OutputAssemblyPath { get; set; }
public FilePath PrimaryAssemblyPath { get; set; }
public List<FilePath> AssemblyPaths { get; set; }

public ILRepackRunnerFixture()
: base("ILRepack.exe")
{
OutputAssemblyPath = "output.exe";
PrimaryAssemblyPath = "input.exe";
AssemblyPaths = new List<FilePath>();
}

protected override void RunTool()
{
var runner = new ILRepackRunner(FileSystem, Environment, Globber, ProcessRunner);
runner.Merge(OutputAssemblyPath, PrimaryAssemblyPath, AssemblyPaths, Settings);
}
}
}
Loading

0 comments on commit 2b6c950

Please sign in to comment.