9using System.Collections.Generic;
13using System.Diagnostics;
17using TestClass = NUnit.Framework.TestFixtureAttribute;
18using TestInitialize = NUnit.Framework.SetUpAttribute;
19using TestCleanup = NUnit.Framework.TearDownAttribute;
20using TestMethod = NUnit.Framework.TestAttribute;
22using Microsoft.VisualStudio.TestTools.UnitTesting;
36 [TestCategory(
"SkipWhenLiveUnitTesting")]
46 personForm.BindUI(personRoot,
true);
50 Assert.AreEqual(personForm.SaveButton.Enabled,
true,
"Default button state on new not correct");
51 Assert.AreEqual(personForm.CancelButton.Enabled,
true,
"Default button state on new not correct");
52 Assert.AreEqual(personForm.CloseButton.Enabled,
true,
"Default button state on new not correct");
53 Assert.AreEqual(personForm.ValidateButton.Enabled,
true,
"Default button state on new not correct");
59 personForm.BindUI(personRoot,
true);
63 Assert.AreEqual(personForm.SaveButton.Enabled,
false,
"Default button state on fetch not correct");
64 Assert.AreEqual(personForm.CancelButton.Enabled,
false,
"Default button state on fetch not correct");
65 Assert.AreEqual(personForm.CloseButton.Enabled,
true,
"Default button state on fetch not correct");
66 Assert.AreEqual(personForm.ValidateButton.Enabled,
true,
"Default button state on fetch not correct");
71 [TestCategory(
"SkipWhenLiveUnitTesting")]
79 personForm.BindUI(personRoot,
true);
83 Assert.AreEqual(personForm.SaveButton.Enabled,
false,
"Default button state on fetch not correct");
84 Assert.AreEqual(personForm.CancelButton.Enabled,
false,
"Default button state on fetch not correct");
85 Assert.AreEqual(personForm.CloseButton.Enabled,
true,
"Default button state on fetch not correct");
86 Assert.AreEqual(personForm.ValidateButton.Enabled,
true,
"Default button state on fetch not correct");
88 personForm.firstNameTextBox.Text =
"";
90 Assert.AreEqual(personForm.SaveButton.Enabled,
false,
"Save button did not become disabled");
91 Assert.AreEqual(personForm.CancelButton.Enabled,
true,
"Cancel button is not enabled");
92 Assert.AreEqual(personForm.CloseButton.Enabled,
true,
"Button state is not correct");
93 Assert.AreEqual(personForm.ValidateButton.Enabled,
true,
"Button state is not correct");
95 personForm.firstNameTextBox.Text =
"ABC";
97 Assert.AreEqual(personForm.SaveButton.Enabled,
true,
"Save button did not become enabled");
98 Assert.AreEqual(personForm.CancelButton.Enabled,
true,
"Cancel button is not enabled");
99 Assert.AreEqual(personForm.CloseButton.Enabled,
true,
"Button state is not correct");
100 Assert.AreEqual(personForm.ValidateButton.Enabled,
true,
"Button state is not correct");
105 [TestCategory(
"SkipWhenLiveUnitTesting")]
115 personForm.BindUI(personRoot,
false);
119 Assert.AreEqual(personForm.saveToolStripButton.Enabled,
true,
"Default button state on new not correct");
120 Assert.AreEqual(personForm.cancelToolStripButton.Enabled,
true,
"Default button state on new not correct");
121 Assert.AreEqual(personForm.closeToolStripButton.Enabled,
true,
"Default button state on new not correct");
122 Assert.AreEqual(personForm.validateToolStripButton.Enabled,
true,
"Default button state on new not correct");
128 personForm.BindUI(personRoot,
false);
132 Assert.AreEqual(personForm.saveToolStripButton.Enabled,
false,
"Default button state on fetch not correct");
133 Assert.AreEqual(personForm.cancelToolStripButton.Enabled,
false,
"Default button state on fetch not correct");
134 Assert.AreEqual(personForm.closeToolStripButton.Enabled,
true,
"Default button state on fetch not correct");
135 Assert.AreEqual(personForm.validateToolStripButton.Enabled,
true,
"Default button state on fetch not correct");
140 [TestCategory(
"SkipWhenLiveUnitTesting")]
148 personForm.BindUI(personRoot,
false);
152 Assert.AreEqual(personForm.saveToolStripButton.Enabled,
false,
"Default button state on fetch not correct");
153 Assert.AreEqual(personForm.cancelToolStripButton.Enabled,
false,
"Default button state on fetch not correct");
154 Assert.AreEqual(personForm.closeToolStripButton.Enabled,
true,
"Default button state on fetch not correct");
155 Assert.AreEqual(personForm.validateToolStripButton.Enabled,
true,
"Default button state on fetch not correct");
157 personForm.firstNameTextBox.Text =
"";
159 Assert.AreEqual(personForm.saveToolStripButton.Enabled,
false,
"Save button did not become disabled");
160 Assert.AreEqual(personForm.cancelToolStripButton.Enabled,
true,
"Cancel button is not enabled");
161 Assert.AreEqual(personForm.closeToolStripButton.Enabled,
true,
"Button state is not correct");
162 Assert.AreEqual(personForm.validateToolStripButton.Enabled,
true,
"Button state is not correct");
164 personForm.firstNameTextBox.Text =
"ABC";
166 Assert.AreEqual(personForm.saveToolStripButton.Enabled,
true,
"Save button did not become enabled");
167 Assert.AreEqual(personForm.cancelToolStripButton.Enabled,
true,
"Cancel button is not enabled");
168 Assert.AreEqual(personForm.closeToolStripButton.Enabled,
true,
"Button state is not correct");
169 Assert.AreEqual(personForm.validateToolStripButton.Enabled,
true,
"Button state is not correct");
Provides consistent context information between the client and server DataPortal objects.
void Clear()
Clears all context collections.
void TestActionExtenderDefaultButtonState()
void TestActionExtenderChangeState()
void TestActionExtenderToolStripDefaultButtonState()
void TestActionExtenderToolStripChangeState()
static EditablePerson NewEditablePerson()
static EditablePerson GetEditablePerson()