Search in sources :

Example 1 with YamlPrinter

use of org.eclipse.winery.repository.converter.writer.YamlPrinter in project winery by eclipse.

the class YamlWriterTests method testPropertyAssignmentSerialization.

@ParameterizedTest
@ArgumentsSource(PropertyAssignmentArgumentsProvider.class)
public void testPropertyAssignmentSerialization(YTPropertyAssignment prop, String expected) {
    YamlWriter writer = new YamlWriter();
    YamlPrinter p = writer.visit(prop, new YamlWriter.Parameter(0).addContext("root"));
    assertEquals(expected, p.toString());
}
Also used : YamlPrinter(org.eclipse.winery.repository.converter.writer.YamlPrinter) YamlWriter(org.eclipse.winery.repository.converter.writer.YamlWriter) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) ArgumentsSource(org.junit.jupiter.params.provider.ArgumentsSource)

Example 2 with YamlPrinter

use of org.eclipse.winery.repository.converter.writer.YamlPrinter in project winery by eclipse.

the class YamlWriterTests method testConstraintClauses.

@ParameterizedTest
@ArgumentsSource(ConstraintClausesArgumentsProvider.class)
public void testConstraintClauses(YTConstraintClause constraint, String expected) {
    YamlWriter writer = new YamlWriter();
    YamlPrinter p = writer.visit(constraint, new YamlWriter.Parameter(0).addContext("root"));
    assertEquals(expected, p.toString());
}
Also used : YamlPrinter(org.eclipse.winery.repository.converter.writer.YamlPrinter) YamlWriter(org.eclipse.winery.repository.converter.writer.YamlWriter) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) ArgumentsSource(org.junit.jupiter.params.provider.ArgumentsSource)

Example 3 with YamlPrinter

use of org.eclipse.winery.repository.converter.writer.YamlPrinter in project winery by eclipse.

the class YamlWriterTests method testTopologyTemplateContent.

@ParameterizedTest
@ArgumentsSource(ServiceTmpltTopologyTmpltProvider.class)
public void testTopologyTemplateContent(YTServiceTemplate serv, String expected) {
    YamlWriter writer = new YamlWriter();
    YamlPrinter p = writer.visit(serv, new YamlWriter.Parameter(0).addContext("root"));
    assertEquals(expected, p.toString());
}
Also used : YamlPrinter(org.eclipse.winery.repository.converter.writer.YamlPrinter) YamlWriter(org.eclipse.winery.repository.converter.writer.YamlWriter) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) ArgumentsSource(org.junit.jupiter.params.provider.ArgumentsSource)

Example 4 with YamlPrinter

use of org.eclipse.winery.repository.converter.writer.YamlPrinter in project winery by eclipse.

the class YamlWriterTests method testServiceTemplates.

@ParameterizedTest
@ArgumentsSource(ServiceTemplatesProvider.class)
public void testServiceTemplates(YTServiceTemplate template, String expected) {
    YamlWriter writer = new YamlWriter();
    YamlPrinter p = writer.visit(template, new YamlWriter.Parameter(0));
    assertEquals(expected, p.toString());
}
Also used : YamlPrinter(org.eclipse.winery.repository.converter.writer.YamlPrinter) YamlWriter(org.eclipse.winery.repository.converter.writer.YamlWriter) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) ArgumentsSource(org.junit.jupiter.params.provider.ArgumentsSource)

Example 5 with YamlPrinter

use of org.eclipse.winery.repository.converter.writer.YamlPrinter in project winery by eclipse.

the class YamlWriterTests method testImports.

@ParameterizedTest
@ArgumentsSource(ImportArgumentsProvider.class)
public void testImports(YTImportDefinition importDef, String expected) {
    YamlWriter writer = new YamlWriter();
    YamlPrinter p = writer.visit(importDef, new YamlWriter.Parameter(0).addContext("root"));
    assertEquals(expected, p.toString());
}
Also used : YamlPrinter(org.eclipse.winery.repository.converter.writer.YamlPrinter) YamlWriter(org.eclipse.winery.repository.converter.writer.YamlWriter) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) ArgumentsSource(org.junit.jupiter.params.provider.ArgumentsSource)

Aggregations

YamlPrinter (org.eclipse.winery.repository.converter.writer.YamlPrinter)7 YamlWriter (org.eclipse.winery.repository.converter.writer.YamlWriter)7 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)7 ArgumentsSource (org.junit.jupiter.params.provider.ArgumentsSource)7