public void TestDeployMultipleArguments() { using (var node = new NodeServer()) { node.Bind(new IPEndPoint(IPAddress.Loopback, Constants.ConnectionPort)); Deploy("DeployWithParameter.cs", new [] { IPAddress.Loopback.ToString() }, new[] { "42", "9001" }).Should().Be(9043); } }
public void TestDeployForwardArguments([Values(1, 2, 3, int.MaxValue)] int argument) { using (var node = new NodeServer()) { node.Bind(new IPEndPoint(IPAddress.Loopback, Constants.ConnectionPort)); Deploy("DeployWithParameter.cs", new [] { IPAddress.Loopback.ToString() }, new[] { argument.ToString() }).Should().Be(argument); } }
public void TestCopy1byte_a() { using (var node = new NodeServer()) { node.Bind(new IPEndPoint(IPAddress.Loopback, Constants.ConnectionPort)); Deploy("Copy1byte_a.cs", new [] { IPAddress.Loopback.ToString() }, new string[0]).Should().Be(0); } }
public void TestDeployWithDistributor() { using (var node = new NodeServer()) { var ep = new IPEndPoint(IPAddress.Loopback, Constants.ConnectionPort); node.Bind(ep); // The script fails if no distributor is given Deploy("DeployWithDistributor.cs", new[] { ep.ToString() }, null).Should().Be((int)ExitCode.Success); } }
public void TestSetup() { var testDirectory = GetTestTempDirectory(); if (Directory.Exists(testDirectory)) { Directory.Delete(testDirectory, true); } _nodeServer = new NodeServer(); _distributor = new Distributor.Distributor(new ConsoleWriter(true)); var ep = _nodeServer.Bind(IPAddress.Loopback); _nodeClient = _distributor.ConnectTo(ep); }
public void TestStartProcessWithoutTimeout() { using (var node = new NodeServer()) { var ep = new IPEndPoint(IPAddress.Loopback, Constants.ConnectionPort); node.Bind(ep); var exitCode = ExitCode.Success; new Action(() => { exitCode = (ExitCode)Deploy("ExecuteDir.cs", new[] { ep.ToString() }, null); }) .ExecutionTime().Should().BeLessOrEqualTo(TimeSpan.FromSeconds(10)); exitCode.Should().Be(ExitCode.Success); } }