forked from daveaglick/Scripty
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScriptyFixture.cs
More file actions
32 lines (27 loc) · 882 Bytes
/
Copy pathScriptyFixture.cs
File metadata and controls
32 lines (27 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using Cake.Core.IO;
using Cake.Testing.Fixtures;
using System;
namespace Cake.Scripty.Tests
{
class ScriptyFixture : ToolFixture<ScriptySettings>
{
public ScriptyFixture() : base("scripty.exe")
{
}
public ScriptyFixture(Action<ScriptyRunner> runAction) : this()
{
RunAction = runAction;
}
private Action<ScriptyRunner> RunAction { get; set; }
internal FilePath ProjectFilePath { get; set; } = "./Sample.csproj";
protected override void RunTool()
{
var runner = new ScriptyRunner(FileSystem, Environment, ProcessRunner, Tools, ProjectFilePath, new ScriptySettings());
RunAction?.Invoke(runner);
}
internal FilePath GetProjectFilePath()
{
return ProjectFilePath.MakeAbsolute(Environment).FullPath;
}
}
}