Пример #1
0
        public void AttachExprParse()
        {
            const string expr = @"report 123
format snmp
parameters
a: b;";

            var result = DslParser.ParseReportAttachmentBlockExpr().Parse(expr);

            result.ReportId.ShouldBeEquivalentTo(123);
            result.ExportFormat.ShouldBeEquivalentTo("snmp");
            result.Parameters.Should().HaveCount(1);

            var param = result.Parameters.First();

            param.Key.ShouldBeEquivalentTo("a");
            param.Value.ShouldBeEquivalentTo("b");
        }