@Test public void shouldReturnObjectToStringWhenNoTypeRegistered() { Parameter metadata = new SimpleParameter().withLevel(new SimpleLevel().withName("string")); MapEntry map = new MapEntry().put("string", "something"); ParameterEntry entry = converter.asEntry(metadata, map); assertThat(entry).hasLevels("something"); }
ParameterEntry asEntry(Parameter metadata, MapEntry entryMap) { String[] levelValues = new String[metadata.getLevels().size()]; int index = 0; for (Level level : metadata.getLevels()) { levelValues[index] = asString(level, entryMap.get(level.getName())); index++; } return new SimpleParameterEntry(levelValues); }
MapToEntryConverter { ParameterEntry asEntry(Parameter metadata, MapEntry entryMap) { String[] levelValues = new String[metadata.getLevels().size()]; int index = 0; for (Level level : metadata.getLevels()) { levelValues[index] = asString(level, entryMap.get(level.getName())); index++; } return new SimpleParameterEntry(levelValues); } }
MapToEntryConverter { ParameterEntry asEntry(Parameter metadata, MapEntry entryMap) { String[] levelValues = new String[metadata.getLevels().size()]; int index = 0; for (Level level : metadata.getLevels()) { levelValues[index] = asString(level, entryMap.get(level.getName())); index++; } return new SimpleParameterEntry(levelValues); } MapToEntryConverter(ParamEngineRuntimeConfig engineConfig); }
MapToEntryConverter { ParameterEntry asEntry(Parameter metadata, MapEntry entryMap) { String[] levelValues = new String[metadata.getLevels().size()]; int index = 0; for (Level level : metadata.getLevels()) { levelValues[index] = asString(level, entryMap.get(level.getName())); index++; } return new SimpleParameterEntry(levelValues); } MapToEntryConverter(ParamEngineRuntimeConfig engineConfig);  }
MapToEntryConverter { ParameterEntry asEntry(Parameter metadata, MapEntry entryMap) { String[] levelValues = new String[metadata.getLevels().size()]; int index = 0; for (Level level : metadata.getLevels()) { levelValues[index] = asString(level, entryMap.get(level.getName())); index++; } return new SimpleParameterEntry(levelValues); } MapToEntryConverter(ParamEngineRuntimeConfig engineConfig);   }