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()); }
public string Build(StubSpec spec) { return(string.Format(_ClassTemplate, BuildLogic(spec), spec.DefaultExitCode)); }