Skip to content

Commit

Permalink
Add failing test for #215
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Aug 14, 2020
1 parent 8211360 commit 1779911
Showing 1 changed file with 21 additions and 0 deletions.
@@ -0,0 +1,21 @@
package com.fasterxml.jackson.dataformat.yaml.failing;

import java.util.Collections;

import com.fasterxml.jackson.dataformat.yaml.ModuleTestBase;
import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator;
import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;

public class SimpleGeneration215Tests extends ModuleTestBase
{
// [dataformats-text#215]: setting used in constructor
public void testStartMarkerViaWriter() throws Exception
{
final String output = YAMLMapper.builder().build()
.writer()
.without(YAMLGenerator.Feature.WRITE_DOC_START_MARKER)
.writeValueAsString(Collections.singletonMap("key", "value"))
.trim();
assertEquals("key: \"value\"", output);
}
}

0 comments on commit 1779911

Please sign in to comment.