Пример #1
0
        public static String[] CreateArgumentsForDelimitedTests(
      String inputFilePath,
      String headerLineID,
      String termLineID,
      String value,
      String matchedOutputFilePath,
      String unmatchedOutputFilePath,
      LogBuilder logBuilder)
        {
            var commandLineArgumentsBuilder = new CommandLineArgumentsBuilder()
            .WithInput(new InputBuilder()
              .IsSingleFile(inputFilePath))
            .WithDelim(new DelimBuilder()
              .HasHeaderLineID(headerLineID)
              .HasTermLineID(termLineID))
            .WithInList(new InListBuilder()
              .HasValuesList(value))
            .WithOutput(new OutputBuilder()
              .HasMatchedOutputFile(matchedOutputFilePath)
              .HasUnmatchedOutputFile(unmatchedOutputFilePath));

              if (logBuilder != null)
              {
            commandLineArgumentsBuilder = commandLineArgumentsBuilder.WithLog(logBuilder);
              }

              return commandLineArgumentsBuilder.Build();
        }
Пример #2
0
        public static String[] CreateArgumentsForDelimitedTests(
      InputBuilder inputBuilder,
      DelimBuilder delimBuilder,
      String value,
      OutputBuilder outputBuilder,
      LogBuilder logBuilder)
        {
            var commandLineArgumentsBuilder = new CommandLineArgumentsBuilder();

              if (inputBuilder != null)
              {
            commandLineArgumentsBuilder = commandLineArgumentsBuilder.WithInput(inputBuilder);
              }

              if (delimBuilder != null)
              {
            commandLineArgumentsBuilder = commandLineArgumentsBuilder.WithDelim(delimBuilder);
              }

              commandLineArgumentsBuilder.WithInList(new InListBuilder()
                                              .HasValuesList(value));

              if (outputBuilder != null)
              {
            commandLineArgumentsBuilder = commandLineArgumentsBuilder.WithOutput(outputBuilder);
              }

              if (logBuilder != null)
              {
            commandLineArgumentsBuilder = commandLineArgumentsBuilder.WithLog(logBuilder);
              }

              return commandLineArgumentsBuilder.Build();
        }
Пример #3
0
 public CommandLineArgumentsBuilder WithLog(LogBuilder logBuilder)
 {
     this.builders.Add(logBuilder);
       return this;
 }
Пример #4
0
        public static LogBuilder CreateLogBuilder(String applicationLogFilePath, String jobLogFilePath)
        {
            LogBuilder logBuilder = null;
              if (applicationLogFilePath != null || jobLogFilePath != null)
              {
            logBuilder = new LogBuilder();

            if (applicationLogFilePath != null)
            {
              logBuilder = logBuilder.HasApplicationLogFilePath(applicationLogFilePath);
            }

            if (jobLogFilePath != null)
            {
              logBuilder = logBuilder.HasJobLogFilePath(jobLogFilePath);
            }
              }

              return logBuilder;
        }
Пример #5
0
        public static String CreateForDelimitedTests(
      String inputFilePath,
      String headerLineID,
      String termLineID,
      String value,
      String matchedOutputFilePath,
      String unmatchedOutputFilePath,
      LogBuilder logBuilder)
        {
            var args = CreateArgumentsForDelimitedTests(
            inputFilePath,
            headerLineID,
            termLineID,
            value,
            matchedOutputFilePath,
            unmatchedOutputFilePath,
            logBuilder);

              return String.Join(" ", args);
        }