public void Test_FormatPatch(string from, string to, string outputFile, int?start) { var arguments = new StringBuilder(); arguments.Append("format-patch -M -C -B"); if (start != null) { arguments.AppendFormat(" --start-number {0}", start); } arguments.AppendFormat(" \"{0}\"..\"{1}\" -o \"{2}\"", from, to, outputFile); string dummyCommandOutput = "The answer is 42. Just check that the Git arguments are as expected."; _executable.StageOutput(arguments.ToString(), dummyCommandOutput); _gitModule.FormatPatch(from, to, outputFile, start).Should().Be(dummyCommandOutput); }