Exemple #1
0
		public void FormatDataValue ()
		{
			ButtonColumnPoker p = new ButtonColumnPoker ();

			p.DataTextFormatString = String.Empty;
			p.Initialize ();
			Assert.AreEqual ("test", p.FormatData ("test"), "A1");
			
			p.DataTextFormatString = "{0} hello";
			p.Initialize ();
			Assert.AreEqual ("test hello", p.FormatData ("test"), "A2");
			
			p.DataTextFormatString = "{0}";
			p.Initialize ();
			Assert.AreEqual ("test", p.FormatData ("test"), "A3");
			
			p.DataTextFormatString = "{0}";
			p.Initialize ();
			Assert.AreEqual (String.Empty, p.FormatData (String.Empty), "A4");

			p.DataTextFormatString = "{0}";
			p.Initialize ();
			p.DataTextFormatString = "i am bad";
			Assert.AreEqual ("i am bad", p.FormatData ("foo"), "A5");

			p.DataTextFormatString = "{0}";
			p.Initialize ();
			Assert.AreEqual (String.Empty, p.FormatData (null), "A6");
		}
Exemple #2
0
        public void FormatDataValue()
        {
            ButtonColumnPoker p = new ButtonColumnPoker();

            p.DataTextFormatString = String.Empty;
            p.Initialize();
            Assert.AreEqual("test", p.FormatData("test"), "A1");

            p.DataTextFormatString = "{0} hello";
            p.Initialize();
            Assert.AreEqual("test hello", p.FormatData("test"), "A2");

            p.DataTextFormatString = "{0}";
            p.Initialize();
            Assert.AreEqual("test", p.FormatData("test"), "A3");

            p.DataTextFormatString = "{0}";
            p.Initialize();
            Assert.AreEqual(String.Empty, p.FormatData(String.Empty), "A4");

            p.DataTextFormatString = "{0}";
            p.Initialize();
            p.DataTextFormatString = "i am bad";
            Assert.AreEqual("i am bad", p.FormatData("foo"), "A5");

            p.DataTextFormatString = "{0}";
            p.Initialize();
            Assert.AreEqual(String.Empty, p.FormatData(null), "A6");
        }