public void Execute_Simulated()
        {
            SimulatedCapturedProcess simulated = new SimulatedCapturedProcess(0, null, (string) null);
            ICapturedProcessFactory factory = new SimulatedCapturedProcessFactory(simulated);
            Parent.AssemblyToJarTask victim = new Parent.AssemblyToJarTask(false, factory);
            victim.AssemblyPaths = "Dependencies/Organization.Product.dll";

            victim.ExecuteForTest();

            Assert.IsTrue(simulated.PathToExecutable.EndsWith("Converter.exe"));
            Regex re = new Regex(@"^
            (""?.+Dependencies[/\\]Organization\.Product.dll""?)\s
            (""?/lib:.+[/\\]v2\.0\.50727;.+Dependencies""?)\s
            (""?/out:.+Dependencies[/\\]Organization\.Product.jar""?)
            $", RegexOptions.IgnorePatternWhitespace);
            Assert.IsTrue(re.IsMatch(simulated.ArgumentString));
        }
Example #2
0
        public void Execute_Simulated()
        {
            SimulatedCapturedProcess simulated = new SimulatedCapturedProcess(0, null, (string)null);
            ICapturedProcessFactory  factory   = new SimulatedCapturedProcessFactory(simulated);

            Parent.AssemblyToJarTask victim = new Parent.AssemblyToJarTask(false, factory);
            victim.AssemblyPaths = "Dependencies/Organization.Product.dll";

            victim.ExecuteForTest();

            Assert.IsTrue(simulated.PathToExecutable.EndsWith("Converter.exe"));
            Regex re = new Regex(@"^
(""?.+Dependencies[/\\]Organization\.Product.dll""?)\s
(""?/lib:.+[/\\]v2\.0\.50727;.+Dependencies""?)\s
(""?/out:.+Dependencies[/\\]Organization\.Product.jar""?)
$", RegexOptions.IgnorePatternWhitespace);

            Assert.IsTrue(re.IsMatch(simulated.ArgumentString));
        }