Ejemplo n.º 1
0
        public void read_a_section_with_a_single_key_value_pair()
        {
            var demo = ZPL.render(ZPL.create(ZPL.top_section("hello", ZPL.kv("who", "world"))));

            ZPL.render(ZPL.parse(demo)).Should().Be(demo);
            ZPL.render(ZPL.parse_relaxed(demo)).Should().Be(demo);
        }
Ejemplo n.º 2
0
        public void read_a_complex_section()
        {
            var demo = ZPL.render(ZPL.create(ZPL.top_section("hello", ZPL.kv("who", "world"), ZPL.section("welcome", ZPL.kv("who", "earth"))), ZPL.top_section("test", ZPL.kv("what", "data"))));

            ZPL.render(ZPL.parse(demo)).Should().Be(demo);
            ZPL.render(ZPL.parse_relaxed(demo)).Should().Be(demo);
        }
Ejemplo n.º 3
0
        public void render_a_valid_ZPL_text_from_a_zpl_structure()
        {
            var          demo     = ZPL.render(ZPL.create(ZPL.top_section("hello", ZPL.kv("who", "world"), ZPL.section("welcome", ZPL.kv("who", "earth"))), ZPL.top_section("test", ZPL.kv("what", "data"))));
            const string expected = "hello\r\n    who=world\r\n    welcome\r\n        who=earth\r\ntest\r\n    what=data\r\n";

            demo.Should().Be(expected);
        }