Esempio n. 1
0
        public void ItAddsProjectToMsbuildInvocation(string optionName)
        {
            var msbuildPath = "<msbuildpath>";

            string[] args = new string[] { optionName, "<project>" };
            CacheCommand.FromArgs(args, msbuildPath)
            .GetProcessStartInfo().Arguments.Should().Be($"{ExpectedPrefix}");
        }
Esempio n. 2
0
        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)}");
        }
Esempio n. 3
0
        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}");
        }