public void ItAddsProjectToMsbuildInvocation(string optionName) { var msbuildPath = "<msbuildpath>"; string[] args = new string[] { optionName, "<project>" }; CacheCommand.FromArgs(args, msbuildPath) .GetProcessStartInfo().Arguments.Should().Be($"{ExpectedPrefix}"); }
public void ItAddsOutputPathToMsBuildInvocation(string optionName) { string path = "/some/path"; var args = ArgsPrefix.Concat(new string[] { optionName, path }).ToArray(); var msbuildPath = "<msbuildpath>"; CacheCommand.FromArgs(args, msbuildPath) .GetProcessStartInfo().Arguments.Should().Be($"{ExpectedPrefix} /p:ComposeDir={Path.GetFullPath(path)}"); }
public void MsbuildInvocationIsCorrect(string[] args, string expectedAdditionalArgs) { args = ArgsPrefix.Concat(args).ToArray(); expectedAdditionalArgs = (string.IsNullOrEmpty(expectedAdditionalArgs) ? "" : $" {expectedAdditionalArgs}"); var msbuildPath = "<msbuildpath>"; CacheCommand.FromArgs(args, msbuildPath) .GetProcessStartInfo().Arguments.Should().Be($"{ExpectedPrefix}{expectedAdditionalArgs}"); }