@Test public void null_transformed_to_config() { ScanConfig result = transformerToTest.transform(null); assertNotNull(result); assertEquals(0, result.getNamePatternMappings().size()); }
public ScanConfig transform(List<ScanMapping> mappings) { ScanConfig config = new ScanConfig(); if (mappings==null || mappings.size()==0) { return config; } for (ScanMapping mapping: mappings) { MappingData data = MappingData.fromString(mapping.getData()); config.getNamePatternMappings().put(mapping.getId(), convert(data)); } return config; }
ScanMappingToScanConfigTransformer { public ScanConfig transform(List<ScanMapping> mappings) { ScanConfig config = new ScanConfig(); if (mappings==null || mappings.size()==0) { return config; } for (ScanMapping mapping: mappings) { MappingData data = MappingData.fromString(mapping.getData()); config.getNamePatternMappings().put(mapping.getId(), convert(data)); } return config; } }
ScanMappingToScanConfigTransformer { public ScanConfig transform(List<ScanMapping> mappings) { ScanConfig config = new ScanConfig(); if (mappings==null || mappings.size()==0) { return config; } for (ScanMapping mapping: mappings) { MappingData data = MappingData.fromString(mapping.getData()); config.getNamePatternMappings().put(mapping.getId(), convert(data)); } return config; }  }
ScanMappingToScanConfigTransformer { public ScanConfig transform(List<ScanMapping> mappings) { ScanConfig config = new ScanConfig(); if (mappings==null || mappings.size()==0) { return config; } for (ScanMapping mapping: mappings) { MappingData data = MappingData.fromString(mapping.getData()); config.getNamePatternMappings().put(mapping.getId(), convert(data)); } return config; }  ScanConfig transform(List<ScanMapping> mappings); }
ScanMappingToScanConfigTransformer { public ScanConfig transform(List<ScanMapping> mappings) { ScanConfig config = new ScanConfig(); if (mappings==null || mappings.size()==0) { return config; } for (ScanMapping mapping: mappings) { MappingData data = MappingData.fromString(mapping.getData()); config.getNamePatternMappings().put(mapping.getId(), convert(data)); } return config; }  ScanConfig transform(List<ScanMapping> mappings);  }