Esempio n. 1
0
        public void DefaultValueTest()
        {
            SimpleLayout l = "${mdc:BBB}";
            //Assert.Equal(1, l.Renderers.Count);
            MdcLayoutRenderer mdc = l.Renderers[0] as MdcLayoutRenderer;

            Assert.NotNull(mdc);
            Assert.Equal("BBB", mdc.Item);
        }
Esempio n. 2
0
        public void ValueWithColonTest()
        {
            SimpleLayout l = "${mdc:item=AAA\\:}";

            Assert.Equal(1, l.Renderers.Count);
            MdcLayoutRenderer mdc = l.Renderers[0] as MdcLayoutRenderer;

            Assert.NotNull(mdc);
            Assert.Equal("AAA:", mdc.Item);
        }
Esempio n. 3
0
        public void SingleParamTest()
        {
            SimpleLayout l = "${mdc:item=AAA}";

            Assert.Equal(1, l.Renderers.Count);
            MdcLayoutRenderer mdc = l.Renderers[0] as MdcLayoutRenderer;

            Assert.NotNull(mdc);
            Assert.Equal("AAA", mdc.Item);
        }
Esempio n. 4
0
        public void EmptyValueTest()
        {
            SimpleLayout l = "${mdc:item=}";

            Assert.Equal(1, l.Renderers.Count);
            MdcLayoutRenderer mdc = l.Renderers[0] as MdcLayoutRenderer;

            Assert.NotNull(mdc);
            Assert.Equal("", mdc.Item);
        }
Esempio n. 5
0
        public void ValueWithBracketTest()
        {
            SimpleLayout l = "${mdc:item=AAA\\}\\:}";

            Assert.Equal("${mdc:item=AAA\\}\\:}", l.Text);
            //Assert.Equal(1, l.Renderers.Count);
            MdcLayoutRenderer mdc = l.Renderers[0] as MdcLayoutRenderer;

            Assert.NotNull(mdc);
            Assert.Equal("AAA}:", mdc.Item);
        }
Esempio n. 6
0
        public void DefaultValueWithBracketTest()
        {
            SimpleLayout l = "${mdc:AAA\\}\\:}";

            Assert.Equal("${mdc:AAA\\}\\:}", l.Text);
            Assert.Single(l.Renderers);
            MdcLayoutRenderer mdc = l.Renderers[0] as MdcLayoutRenderer;

            Assert.NotNull(mdc);
            Assert.Equal("AAA}:", mdc.Item);
        }
Esempio n. 7
0
        public void DefaultValueWithBracketTest()
        {
            SimpleLayout l = "${mdc:AAA\\}\\:}";

            Assert.AreEqual(l.Text, "${mdc:AAA\\}\\:}");
            Assert.AreEqual(1, l.Renderers.Count);
            MdcLayoutRenderer mdc = l.Renderers[0] as MdcLayoutRenderer;

            Assert.IsNotNull(mdc);
            Assert.AreEqual("AAA}:", mdc.Item);
        }