Beispiel #1
0
 public void AForeachLoopInAScript()
 {
     var runner = new ScriptRunner()
     .SetFile("_scriptWithIteration.txt")
     .Run();
       runner.Logged("1").ShouldBeTrue();
       runner.Logged("2").ShouldBeTrue();
       runner.Logged("3").ShouldBeTrue();
 }
Beispiel #2
0
 public void MessagesAreObtainableFromTheScript()
 {
     var runner = new ScriptRunner()
     .SetFile("_scriptWithMessage.txt")
     .Run();
       runner.Logged("Hello from Default").ShouldBeTrue();
 }
Beispiel #3
0
 public void ConnectingPropertyToPSOutput()
 {
     var runner = new ScriptRunner()
     .SetFile("_scriptWithPowershellFillProp.txt")
     .Run();
       runner.Logged(DateTime.Now.ToString("yyyy.MM.dd")).ShouldBeTrue();
 }
Beispiel #4
0
 public void SetupAllowsToPassInProperties()
 {
     var runner = new ScriptRunner()
     .SetFile("_scriptWithVarOutput.txt")
     .ExposeSetup(b => b.Property = "Foo=Baz;Bar=Alice")
     .Run();
       runner.Logged("Baz").ShouldBeTrue();
       runner.Logged("Alice").ShouldBeTrue();
 }
Beispiel #5
0
 public void SetupAllowsToSepcifyATarget()
 {
     var runner = new ScriptRunner()
     .SetFile("_scriptWithMessage.txt")
     .ExposeSetup(b=>b.Target="B")
     .Run();
       runner.Logged("Hello from Default").ShouldBeFalse();
       runner.Logged("Hello from B").ShouldBeTrue();
 }