??????????????????????????????????????????????????懈?????????????????????????????????????????????????????????????????????????????

???????????

?????????械?????????????????????????????????????Person?????????????????????????????????????????????????貌??????????????????????????????????????浠�??????????????????????????小?

?????????????????

Assert.IsFalse(person.HasErrors?? "Test setup failed?? HasErrors is not false");
Assert.IsFalse(person.IsChanged?? "Test setup failed?? IsChanged is not false");
Assert.AreEqual("Adam"?? person.FirstName?? "Test setup failed?? FirstName is not Adam");
Assert.AreEqual("Smith"?? person.LastName?? "Test setup failed?? LastName is not Smith");

????????????????????????????????些???????????????????????????????????校??????????????????????????????????????????????????些???????????????????????????

????[TestMethod]

public void Person_FirstName_Set()
{
     var person = GetAdamSmith();
     ...


?????????????

????????????????????????“???????”?????????????????????泄??????????????????胁????????????????????

??????????????????????????????????????????????????械?????????????????写???????????渭???????????????????????????????XML??????????????写????????????????????????????貌????????????谩??些?????MBTest????????????????????????????????????????????????????????????????????

[TestMethod]
public void Person_FullName_Tests()
{    
     Person_FullName_Test("Bob"?? "Jones"?? "Bob Jones");
     Person_FullName_Test("Bob "?? "Jones"?? "Bob Jones");
     Person_FullName_Test(" Bob"?? "Jones"?? "Bob Jones");
     Person_FullName_Test("Bob"?? " Jones"?? "Bob Jones");
     Person_FullName_Test("Bob"?? "Jones "?? "Bob Jones");
     Person_FullName_Test(null?? "Jones"?? "Jones");
     Person_FullName_Test(string.Empty?? "Jones"?? "Jones");
     Person_FullName_Test("      "?? "Jones"?? "Jones");
     Person_FullName_Test("Bob"?? ""?? "Bob");
     Person_FullName_Test("Bob"?? null?? "Bob");
     Person_FullName_Test("Bob"?? string.Empty?? "Bob");
     Person_FullName_Test("Bob"?? "      "?? "Bob");
}
private void Person_FullName_Test(string firstName?? string lastName?? string expectedFullName)
{
     var person = GetAdamSmith();
     person.FirstName = firstName;
     person.LastName = lastName;
     Assert.AreEqual(expectedFullName?? person.FullName??
          string.Format("Incorrect full name when first name is ‘{0}‘ and last name is ‘{1}‘"
          firstName ?? ""?? lastName ?? ""));
}


???????????????????????????????????????????????????????????????位??些??????????????????????????????

????????

????????魏伪?????写???????????贸????????????????

?????? ????????位???????????????

?????? ?????????????????????????

?????? ?????????????

?????? ??????????????????

??????????些?????????????????????????????????????????????????????妫�??????????? + ?????????写??????????? + ??????API???????????渭?????????? + ????????????????械???????????? + ?????????????卸???????????????????????