Search in sources :

Example 6 with YamlPrinter

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

the class YamlWriterTests method testPolicyTypeSerialization.

@ParameterizedTest
@ArgumentsSource(PolicyTypeArgumentsProvider.class)
public void testPolicyTypeSerialization(YTServiceTemplate 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 7 with YamlPrinter

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

the class YamlWriterTests method testPropertyFunctionSerialization.

@ParameterizedTest
@ArgumentsSource(PropertyFunctionArgumentsProvider.class)
public void testPropertyFunctionSerialization(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)

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