@Test(expected = IllegalArgumentException.class) public void testYamlBean2Yaml_Null() throws Exception { this.converter.convertToYaml(null); }
@Override public String convertToYaml(YAMLElement yamlRoot) throws ConverterException { if (yamlRoot == null) { throw new IllegalArgumentException("Root element may not be null!"); } final Writer output = new StringWriter(); final YamlWriter writer = new YamlWriter(output); adjustConfig(writer.getConfig()); try { writer.write(yamlRoot); writer.close(); } catch (final YamlException e) { throw new ConverterException(e); } return output.toString(); }
YamlBeansConverter implements IToscaYaml2YamlBeanConverter { @Override public String convertToYaml(YAMLElement yamlRoot) throws ConverterException { if (yamlRoot == null) { throw new IllegalArgumentException("Root element may not be null!"); } final Writer output = new StringWriter(); final YamlWriter writer = new YamlWriter(output); adjustConfig(writer.getConfig()); try { writer.write(yamlRoot); writer.close(); } catch (final YamlException e) { throw new ConverterException(e); } return output.toString(); } }
YamlBeansConverter implements IToscaYaml2YamlBeanConverter { @Override public String convertToYaml(YAMLElement yamlRoot) throws ConverterException { if (yamlRoot == null) { throw new IllegalArgumentException("Root element may not be null!"); } final Writer output = new StringWriter(); final YamlWriter writer = new YamlWriter(output); adjustConfig(writer.getConfig()); try { writer.write(yamlRoot); writer.close(); } catch (final YamlException e) { throw new ConverterException(e); } return output.toString(); }  }
YamlBeansConverter implements IToscaYaml2YamlBeanConverter { @Override public String convertToYaml(YAMLElement yamlRoot) throws ConverterException { if (yamlRoot == null) { throw new IllegalArgumentException("Root element may not be null!"); } final Writer output = new StringWriter(); final YamlWriter writer = new YamlWriter(output); adjustConfig(writer.getConfig()); try { writer.write(yamlRoot); writer.close(); } catch (final YamlException e) { throw new ConverterException(e); } return output.toString(); }  @Override ServiceTemplate convertToYamlBean(String yamlString); @Override String convertToYaml(YAMLElement yamlRoot); }
YamlBeansConverter implements IToscaYaml2YamlBeanConverter { @Override public String convertToYaml(YAMLElement yamlRoot) throws ConverterException { if (yamlRoot == null) { throw new IllegalArgumentException("Root element may not be null!"); } final Writer output = new StringWriter(); final YamlWriter writer = new YamlWriter(output); adjustConfig(writer.getConfig()); try { writer.write(yamlRoot); writer.close(); } catch (final YamlException e) { throw new ConverterException(e); } return output.toString(); }  @Override ServiceTemplate convertToYamlBean(String yamlString); @Override String convertToYaml(YAMLElement yamlRoot);  }