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);
47 personForm.bindingSourceRefresh1.RefreshOnException =
false;
51 Assert.AreEqual(personForm.firstNameTextBox.Text, personRoot.FirstName);
55 personForm.firstNameTextBox.Text =
"Dummy First Name Value";
57 catch (System.Security.SecurityException) { };
59 Assert.AreNotEqual(personForm.firstNameTextBox.Text, personRoot.FirstName);
65 [TestCategory(
"SkipWhenLiveUnitTesting")]
75 personForm.BindUI(personRoot);
76 personForm.bindingSourceRefresh1.RefreshOnException =
true;
80 Assert.AreEqual(personForm.firstNameTextBox.Text, personRoot.FirstName);
84 personForm.firstNameTextBox.Text =
"Dummy First Name Value";
86 catch (System.Security.SecurityException) { };
88 Assert.AreEqual(personForm.firstNameTextBox.Text, personRoot.FirstName,
"Values did not refresh");
102 personForm.BindUI(personRoot);
106 Assert.AreEqual(personForm.firstNameTextBox.Text, personRoot.FirstName);
107 Assert.AreEqual(personForm.lastNameTextBox.Text, personRoot.LastName);
108 Assert.AreEqual(personForm.middleNameTextBox.Text, personRoot.MiddleName);
109 Assert.AreEqual(personForm.placeOfBirthTextBox.Text, personRoot.PlaceOfBirth);
111 personRoot.AuthLevel = 3;
112 Assert.AreEqual(personForm.firstNameTextBox.Text, personRoot.FirstName,
"Values did not refresh");
113 Assert.AreEqual(personForm.lastNameTextBox.Text, personRoot.LastName,
"Values did not refresh");
114 Assert.AreEqual(personForm.middleNameTextBox.Text, personRoot.MiddleName,
"Values did not refresh");
115 Assert.AreEqual(personForm.placeOfBirthTextBox.Text, personRoot.PlaceOfBirth,
"Values did not refresh");
Provides consistent context information between the client and server DataPortal objects.
void Clear()
Clears all context collections.
void TestDoNotRefreshOnException()
void TestRefreshOnException()
static EditablePerson GetEditablePerson()