Ejemplo n.º 1
0
 public void VerifyTokenWithLocalTags()
 {
     AssertSequenceOfEventsFrom(Yaml.ParserForResource("local-tags.yaml"),
                                StreamStart,
                                DocumentStart(Explicit),
                                BlockMappingStart.T("!MyObject").Explicit,
                                PlainScalar("a"),
                                PlainScalar("1.0"),
                                PlainScalar("b"),
                                PlainScalar("42"),
                                PlainScalar("c"),
                                PlainScalar("-7"),
                                MappingEnd,
                                DocumentEnd(Implicit),
                                StreamEnd);
 }
Ejemplo n.º 2
0
 public void VerifyTokenWithMultiDocTag()
 {
     AssertSequenceOfEventsFrom(Yaml.ParserForResource("multi-doc-tag.yaml"),
                                StreamStart,
                                DocumentStart(Explicit, Version(1, 1),
                                              TagDirective("!x!", "tag:example.com,2014:"),
                                              TagDirective("!", "!"),
                                              TagDirective("!!", TagYaml)),
                                BlockMappingStart.T("tag:example.com,2014:foo").Explicit,
                                PlainScalar("x"),
                                PlainScalar("0"),
                                MappingEnd,
                                DocumentEnd(Implicit),
                                DocumentStart(Explicit),
                                BlockMappingStart.T("tag:example.com,2014:bar").Explicit,
                                PlainScalar("x"),
                                PlainScalar("1"),
                                MappingEnd,
                                DocumentEnd(Implicit),
                                StreamEnd);
 }