Пример #1
0
        public void CanParseSimpleSubstitutionFile()
        {
            JsonPlusRoot ctx = ResUtility.GetEmbed("SimpleSub.jsonp");
            var          val = ctx.GetString("root.simple-string");

            Assert.Equal("Hello world", val);
        }
Пример #2
0
        public void SelfReferenceOptionalSubstitutionInValueConcatenationShouldBeIgnored()
        {
            var source = "a = ${?a}foo";

            JsonPlusRoot root = null;
            var          ex   = Record.Exception(() => root = JsonPlusParser.Parse(source));

            Assert.Null(ex);

            Assert.Equal("foo", root.GetString("a"));
        }