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); }
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); }
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); }
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); }
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); }
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); }
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); }