public void ButtonField_FormatDataTextValue()
        {
            PokerButtonField button = new PokerButtonField();

            button.DataTextFormatString = "-{0,8:G}-";
            string result = button.DoFormatDataTextValue(10);

            Assert.AreEqual("-      10-", result, "FormatDataValueWithFormat");
        }
        public void ButtonField_DefaultProperty()
        {
            PokerButtonField button = new PokerButtonField();

            Assert.AreEqual("", button.CommandName, "CommandName");
            Assert.AreEqual("", button.DataTextField, "DataTextField");
            Assert.AreEqual("", button.DataTextFormatString, "DataTextFormatString");
            Assert.AreEqual("", button.ImageUrl, "ImageUrl");
            Assert.AreEqual("", button.Text, "Text");
        }
        public void ButtonField_CreateField()
        {
            PokerButtonField button   = new PokerButtonField();
            DataControlField newfield = button.DoCreateField();

            if (!(newfield is ButtonField))
            {
                Assert.Fail("New buttonfield was not created");
            }
        }
        public void ButtonField_Initialize()
        {
            Control control = new Control();

            control.ID = "test";
            PokerButtonField button = new PokerButtonField();
            bool             result = button.Initialize(true, control);

            Assert.AreEqual(false, result, "Initialize");
            Assert.AreEqual("test", button.GetControl.ID, "InitializeControl");
        }
        public void ButtonField_AssignProperty()
        {
            PokerButtonField button = new PokerButtonField();

            button.CommandName = "test";
            Assert.AreEqual("test", button.CommandName, "CommandName");
            button.DataTextField = "test";
            Assert.AreEqual("test", button.DataTextField, "DataTextField");
            button.DataTextFormatString = "test";
            Assert.AreEqual("test", button.DataTextFormatString, "DataTextFormatString");
            button.ImageUrl = "test";
            Assert.AreEqual("test", button.ImageUrl, "ImageUrl");
            button.Text = "test";
            Assert.AreEqual("test", button.Text, "Text");
        }
        public void ButtonField_CopyProperties()
        {
            PokerButtonField button = new PokerButtonField();
            ButtonField      copy   = new ButtonField();

            button.CommandName          = "CommandName";
            button.DataTextField        = "DataTextField";
            button.DataTextFormatString = "DataTextFormatString";
            button.ImageUrl             = "ImageUrl";
            button.Text = "Text";

            button.DoCopyProperties(copy);
            Assert.AreEqual("CommandName", copy.CommandName, "CommandName");
            Assert.AreEqual("DataTextField", copy.DataTextField, "DataTextField");
            Assert.AreEqual("DataTextFormatString", copy.DataTextFormatString, "DataTextFormatString");
            Assert.AreEqual("ImageUrl", copy.ImageUrl, "ImageUrl");
            Assert.AreEqual("Text", copy.Text, "Text");
        }
Beispiel #7
0
		public void ButtonField_DefaultProperty ()
		{
			PokerButtonField button = new PokerButtonField ();
			Assert.AreEqual ("", button.CommandName, "CommandName");
			Assert.AreEqual ("", button.DataTextField, "DataTextField");
			Assert.AreEqual ("", button.DataTextFormatString, "DataTextFormatString");
			Assert.AreEqual ("", button.ImageUrl, "ImageUrl");
			Assert.AreEqual ("", button.Text, "Text");
		}
Beispiel #8
0
		public void ButtonField_FormatDataTextValue ()
		{
			PokerButtonField button = new PokerButtonField ();
			button.DataTextFormatString = "-{0,8:G}-";
			string result = button.DoFormatDataTextValue(10);
			Assert.AreEqual ("-      10-", result, "FormatDataValueWithFormat");
		}
Beispiel #9
0
		public void ButtonField_CreateField ()
		{
			PokerButtonField button = new PokerButtonField ();
			DataControlField newfield = button.DoCreateField ();
			if (!(newfield is ButtonField)) {
				Assert.Fail ("New buttonfield was not created");
			}

		}
Beispiel #10
0
		public void ButtonField_CopyProperties ()
		{
			PokerButtonField button = new PokerButtonField ();
			ButtonField copy = new ButtonField ();
			button.CommandName = "CommandName";
			button.DataTextField = "DataTextField";
			button.DataTextFormatString = "DataTextFormatString";
			button.ImageUrl = "ImageUrl";
			button.Text = "Text";

			button.DoCopyProperties (copy);
			Assert.AreEqual ("CommandName", copy.CommandName, "CommandName");
			Assert.AreEqual ("DataTextField", copy.DataTextField, "DataTextField");
			Assert.AreEqual ("DataTextFormatString", copy.DataTextFormatString, "DataTextFormatString");
			Assert.AreEqual ("ImageUrl", copy.ImageUrl, "ImageUrl");
			Assert.AreEqual ("Text", copy.Text, "Text");
		}
Beispiel #11
0
		public void ButtonField_Initialize ()
		{
			Control control = new Control ();
			control.ID = "test";
			PokerButtonField button = new PokerButtonField ();
			bool result = button.Initialize (true, control);
			Assert.AreEqual (false, result, "Initialize");
			Assert.AreEqual ("test", button.GetControl.ID, "InitializeControl");
		}
Beispiel #12
0
		public void ButtonField_AssignProperty ()
		{
			PokerButtonField button = new PokerButtonField ();
			button.CommandName = "test";
			Assert.AreEqual ("test", button.CommandName, "CommandName");
			button.DataTextField = "test";
			Assert.AreEqual ("test", button.DataTextField, "DataTextField");
			button.DataTextFormatString = "test";
			Assert.AreEqual ("test", button.DataTextFormatString, "DataTextFormatString");
			button.ImageUrl = "test";
			Assert.AreEqual ("test", button.ImageUrl, "ImageUrl");
			button.Text = "test";
			Assert.AreEqual ("test", button.Text, "Text");
		}