forked from scriptcs/scriptcs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScriptPacks.cs
More file actions
29 lines (24 loc) · 994 Bytes
/
ScriptPacks.cs
File metadata and controls
29 lines (24 loc) · 994 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
namespace ScriptCs.Tests.Acceptance
{
using System.Reflection;
using ScriptCs.Tests.Acceptance.Support;
using Should;
using Xbehave;
public static class ScriptPacks
{
[Scenario]
public static void UsingAScriptPack(ScenarioDirectory directory, string output)
{
var scenario = MethodBase.GetCurrentMethod().GetFullName();
"Given a script which uses ScriptCs.Adder to print the sum of 1234 and 5678"
.f(() => directory = ScenarioDirectory.Create(scenario)
.WriteLine("foo.csx", @"Console.WriteLine(Require<Adder>().Add(1234, 5678));"));
"And ScriptCs.Adder is installed"
.f(() => ScriptCsExe.Install("ScriptCs.Adder.Local", directory));
"When execute the script"
.f(() => output = ScriptCsExe.Run("foo.csx", directory));
"Then I see 6912"
.f(() => output.ShouldContain("6912"));
}
}
}