public void Test_AddDataSource_adds_data_sources_to_StringBuilder_in_correct_format() { Random random = new Random(); string dst_datasource = "File" + random.Next(1000); string src_datasource = "File" + random.Next(1000); builder.AddDataSource(dst_datasource, src_datasource); Assert.AreEqual(stringBuilder.ToString(), String.Format(" {0} {1}", dst_datasource, src_datasource)); }
public string buildOgr2Ogr(TransformOperationParam json, string program, string dst_data, string src_data) { ICommandBuilder builder = createNewCommandBuilder(); builder.AddProgramName(program); builder.AdditionalArguments("-f", json.Type); if (json.SourceCrs != null && json.TargetCrs != null) { builder.AdditionalArguments("-s_srs", json.SourceCrs); builder.AdditionalArguments("-t_srs", json.TargetCrs); } else if (json.TargetCrs != null) { builder.AdditionalArguments("-t_srs", json.TargetCrs); } if (json.SkipFailures != null) { builder.SignleParameter(json.SkipFailures); } builder.AddDataSource(dst_data, src_data); return(builder.GetResult()); }