Exemplo n.º 1
0
        private static string BuildLogic(StubSpec spec)
        {
            var buf = new StringBuilder();

            foreach (var invocation in spec.Invocations)
            {
                buf.AppendFormat(_IsMatchCallTemplate,
                                 ForgeUseRegex(invocation),
                                 FormatCommandLine(invocation),
                                 invocation.ExecutionDelay,
                                 invocation.ExitCode);
            }
            return(buf.ToString());
        }
Exemplo n.º 2
0
 public string Build(StubSpec spec)
 {
     return(string.Format(_ClassTemplate, BuildLogic(spec), spec.DefaultExitCode));
 }