コード例 #1
0
        public void CommandField_DefaultProperty()
        {
            PokerCommandField field = new PokerCommandField();

            Assert.AreEqual("", field.CancelImageUrl, "CancelImageUrl");
            Assert.AreEqual("Cancel", field.CancelText, "CancelText");
            Assert.AreEqual(true, field.CausesValidation, "CausesValidation");
            Assert.AreEqual("", field.DeleteImageUrl, "DeleteImageUrl");
            Assert.AreEqual("Delete", field.DeleteText, "DeleteText");
            Assert.AreEqual("", field.EditImageUrl, "EditImageUrl");
            Assert.AreEqual("Edit", field.EditText, "EditText");
            Assert.AreEqual("", field.InsertImageUrl, "InsertImageUrl");
            Assert.AreEqual("Insert", field.InsertText, "InsertText");
            Assert.AreEqual("", field.NewImageUrl, "NewImageUrl");
            Assert.AreEqual("New", field.NewText, "NewText");
            Assert.AreEqual("", field.SelectImageUrl, "SelectImageUrl");
            Assert.AreEqual("Select", field.SelectText, "SelectText");
            Assert.AreEqual(true, field.ShowCancelButton, "ShowCancelButton ");
            Assert.AreEqual(false, field.ShowDeleteButton, "ShowDeleteButton");
            Assert.AreEqual(false, field.ShowEditButton, "ShowEditButton");
            Assert.AreEqual(false, field.ShowInsertButton, "ShowInsertButton");
            Assert.AreEqual(false, field.ShowSelectButton, "ShowSelectButton");
            Assert.AreEqual("", field.UpdateImageUrl, "UpdateImageUrl");
            Assert.AreEqual("Update", field.UpdateText, "UpdateText");
        }
コード例 #2
0
        public void CommandField_ValidateSupportsCallback_pass()
        {
            PokerCommandField field = new PokerCommandField();

            field.ShowSelectButton = false;
            field.Initialize(true, new Control());
            field.ValidateSupportsCallback();
        }
コード例 #3
0
        public void CommandField_CreateField()
        {
            PokerCommandField field    = new PokerCommandField();
            DataControlField  newfield = field.DoCreateField();

            if (!(newfield is CommandField))
            {
                Assert.Fail("New CommandField was not created");
            }
        }
コード例 #4
0
        public void CommandField_CopyProperty()
        {
            PokerCommandField field = new PokerCommandField();
            CommandField      copy  = new CommandField();

            field.CancelImageUrl   = "test";
            field.CancelText       = "test";
            field.CausesValidation = false;
            field.DeleteImageUrl   = "test";
            field.DeleteText       = "test";
            field.EditImageUrl     = "test";
            field.EditText         = "test";
            field.InsertImageUrl   = "test";
            field.InsertText       = "test";
            field.NewImageUrl      = "test";
            field.NewText          = "test";
            field.SelectImageUrl   = "test";
            field.SelectText       = "test";
            field.ShowCancelButton = false;
            field.ShowDeleteButton = true;
            field.ShowEditButton   = true;
            field.ShowInsertButton = true;
            field.ShowSelectButton = true;
            field.UpdateImageUrl   = "test";
            field.UpdateText       = "test";

            field.DoCopyProperties(copy);
            Assert.AreEqual(false, copy.CausesValidation, "CausesValidation");
            Assert.AreEqual("test", copy.DeleteImageUrl, "DeleteImageUrl");
            Assert.AreEqual("test", copy.DeleteText, "DeleteText");
            Assert.AreEqual("test", copy.EditImageUrl, "EditImageUrl");
            Assert.AreEqual("test", copy.EditText, "EditText");
            Assert.AreEqual("test", copy.InsertImageUrl, "InsertImageUrl");
            Assert.AreEqual("test", copy.InsertText, "InsertText");
            Assert.AreEqual("test", copy.NewImageUrl, "NewImageUrl");
            Assert.AreEqual("test", copy.NewText, "NewText");
            Assert.AreEqual("test", copy.SelectImageUrl, "SelectImageUrl");
            Assert.AreEqual("test", copy.SelectText, "SelectText");
            Assert.AreEqual(false, copy.ShowCancelButton, "ShowCancelButton ");
            Assert.AreEqual(true, copy.ShowDeleteButton, "ShowDeleteButton");
            Assert.AreEqual(true, copy.ShowEditButton, "ShowEditButton");
            Assert.AreEqual(true, copy.ShowInsertButton, "ShowInsertButton");
            Assert.AreEqual(true, copy.ShowSelectButton, "ShowSelectButton");
            Assert.AreEqual("test", copy.UpdateImageUrl, "UpdateImageUrl");
            Assert.AreEqual("test", copy.UpdateText, "UpdateText");
            Assert.AreEqual("test", copy.CancelImageUrl, "CancelImageUrl");
            Assert.AreEqual("test", copy.CancelText, "CancelText");
        }
コード例 #5
0
ファイル: CommandFieldTest.cs プロジェクト: Profit0004/mono
		public void CommandField_DefaultProperty ()
		{
			PokerCommandField field = new PokerCommandField ();
			Assert.AreEqual ("", field.CancelImageUrl, "CancelImageUrl");
			Assert.AreEqual ("Cancel", field.CancelText, "CancelText");
			Assert.AreEqual (true, field.CausesValidation, "CausesValidation");
			Assert.AreEqual ("", field.DeleteImageUrl, "DeleteImageUrl");
			Assert.AreEqual ("Delete", field.DeleteText, "DeleteText");
			Assert.AreEqual ("", field.EditImageUrl, "EditImageUrl");
			Assert.AreEqual ("Edit", field.EditText, "EditText");
			Assert.AreEqual ("", field.InsertImageUrl, "InsertImageUrl");
			Assert.AreEqual ("Insert", field.InsertText, "InsertText");
			Assert.AreEqual ("", field.NewImageUrl, "NewImageUrl");
			Assert.AreEqual ("New", field.NewText, "NewText");
			Assert.AreEqual ("", field.SelectImageUrl, "SelectImageUrl");
			Assert.AreEqual ("Select", field.SelectText, "SelectText");
			Assert.AreEqual (true, field.ShowCancelButton, "ShowCancelButton ");
			Assert.AreEqual (false, field.ShowDeleteButton, "ShowDeleteButton");
			Assert.AreEqual (false, field.ShowEditButton, "ShowEditButton");
			Assert.AreEqual (false, field.ShowInsertButton, "ShowInsertButton");
			Assert.AreEqual (false, field.ShowSelectButton , "ShowSelectButton");
			Assert.AreEqual ("", field.UpdateImageUrl, "UpdateImageUrl");
			Assert.AreEqual ("Update", field.UpdateText, "UpdateText");


		}
コード例 #6
0
ファイル: CommandFieldTest.cs プロジェクト: Profit0004/mono
		public void CommandField_ValidateSupportsCallback_pass ()
		{
			PokerCommandField field = new PokerCommandField ();
			field.ShowSelectButton = false;
			field.Initialize (true, new Control ());
			field.ValidateSupportsCallback ();
		}
コード例 #7
0
ファイル: CommandFieldTest.cs プロジェクト: Profit0004/mono
		public void CommandField_CreateField ()
		{
			PokerCommandField field = new PokerCommandField ();
			DataControlField newfield = field.DoCreateField ();
			if (!(newfield is CommandField)) {
				Assert.Fail ("New CommandField was not created");
			}

		}
コード例 #8
0
ファイル: CommandFieldTest.cs プロジェクト: Profit0004/mono
		public void CommandField_CopyProperty ()
		{
			PokerCommandField field = new PokerCommandField ();
			CommandField copy = new CommandField ();
			field.CancelImageUrl = "test";
			field.CancelText = "test";
			field.CausesValidation = false;
			field.DeleteImageUrl = "test";
			field.DeleteText = "test";
			field.EditImageUrl = "test";
			field.EditText = "test";
			field.InsertImageUrl = "test";
			field.InsertText = "test";
			field.NewImageUrl = "test";
			field.NewText = "test";
			field.SelectImageUrl = "test";
			field.SelectText = "test";
			field.ShowCancelButton = false;
			field.ShowDeleteButton = true;
			field.ShowEditButton = true;
			field.ShowInsertButton = true;
			field.ShowSelectButton = true;
			field.UpdateImageUrl = "test";
			field.UpdateText = "test";

			field.DoCopyProperties (copy);
			Assert.AreEqual (false, copy.CausesValidation, "CausesValidation");
			Assert.AreEqual ("test", copy.DeleteImageUrl, "DeleteImageUrl");
			Assert.AreEqual ("test", copy.DeleteText, "DeleteText");
			Assert.AreEqual ("test", copy.EditImageUrl, "EditImageUrl");
			Assert.AreEqual ("test", copy.EditText, "EditText");
			Assert.AreEqual ("test", copy.InsertImageUrl, "InsertImageUrl");
			Assert.AreEqual ("test", copy.InsertText, "InsertText");
			Assert.AreEqual ("test", copy.NewImageUrl, "NewImageUrl");
			Assert.AreEqual ("test", copy.NewText, "NewText");
			Assert.AreEqual ("test", copy.SelectImageUrl, "SelectImageUrl");
			Assert.AreEqual ("test", copy.SelectText, "SelectText");
			Assert.AreEqual (false, copy.ShowCancelButton, "ShowCancelButton ");
			Assert.AreEqual (true, copy.ShowDeleteButton, "ShowDeleteButton");
			Assert.AreEqual (true, copy.ShowEditButton, "ShowEditButton");
			Assert.AreEqual (true, copy.ShowInsertButton, "ShowInsertButton");
			Assert.AreEqual (true, copy.ShowSelectButton, "ShowSelectButton");
			Assert.AreEqual ("test", copy.UpdateImageUrl, "UpdateImageUrl");
			Assert.AreEqual ("test", copy.UpdateText, "UpdateText");
			Assert.AreEqual ("test", copy.CancelImageUrl, "CancelImageUrl");
			Assert.AreEqual ("test", copy.CancelText, "CancelText");

		}