public void VerifyDevenvProcessInfo() { ProcessInfo info = null; ProcessResult processResult = new ProcessResult("output", "error", 0, false); mockProcessExecutor.Setup(executor => executor.Execute(It.IsAny <ProcessInfo>())). Callback <ProcessInfo>(processInfo => info = processInfo).Returns(processResult).Verifiable(); task.Executable = DEVENV_PATH; task.SolutionFile = "\"mySolution.sln\""; task.Configuration = "Debug"; task.Run(IntegrationResult()); Assert.AreEqual(DEVENV_PATH, info.FileName); Assert.AreEqual(DevenvTask.DEFAULT_BUILD_TIMEOUT * 1000, info.TimeOut); AssertStartsWith("\"mySolution.sln\" /rebuild \"Debug\"", info.Arguments); }
public void VerifyDevenvProcessInfo() { CollectingConstraint constraint = new CollectingConstraint(); ProcessResult processResult = new ProcessResult("output", "error", 0, false); mockProcessExecutor.ExpectAndReturn("Execute", processResult, new object[] { constraint }); task.Executable = DEVENV_PATH; task.SolutionFile = "\"mySolution.sln\""; task.Configuration = "Debug"; task.Run(IntegrationResult()); ProcessInfo info = (ProcessInfo)constraint.Parameter; Assert.AreEqual(DEVENV_PATH, info.FileName); Assert.AreEqual(DevenvTask.DEFAULT_BUILD_TIMEOUT * 1000, info.TimeOut); AssertStartsWith("\"mySolution.sln\" /rebuild \"Debug\"", info.Arguments); }