??Visual Studio 2012?????????
???????????? ???????[ 2014/12/9 14:28:17 ] ??????????????? ??????? VS
??????????????????????????????????????д???????????????????????????????????????????????????????????????ɡ?
??????????????????????????????????????????????????????????????ν????????????????????????????????????°ɡ??????????????????滹????????????????????????
??????????????????????Щ???????VS2012???е???????С?????С??????????????????????????????????????????????????????
????1.??д???????????????????????????У?????е????->???????->??С??????????д????????????????????VS2012?????????????????????????????????????????????????????????????????????У???????????????????????????ò????????
????2.?????????????????????????????????????????
????3.?????????????????????????????е???????
????4.????????????Attribute——TestCategory("???????????");
????5.??????????????Fakes??????????????????????????????????????????
????6.???????????????е????????????????????????Attribute[TestInitialize]?????????public????
????7.???????????
???????????????????д?????????????????е?????????Щδ?漰?????????????
????1.?????????????????????????XmlSerializationTest?????????£?
???????????
????[TestClass]
????public class XmlSerializationTest
????{
????[TestMethod]
????public void TestWriteXml()
????{
????UserInfo user=new UserInfo();
????XmlSerialization serialization=new XmlSerialization();
????bool flag=serialization.WriteXml<UserInifo>(user);
????Assert.IsTrue(flag);
????}
????}
???????????
???????????????????Xml???л????в???????????????????????????UserModel?????????????????????????????
????public class UserModel
????{
????public string LoginName{get;set;}
????public string Password{get;set;}
????}
?????????????д????????????????????????????????д????????????????????????????????????檔
???????????
????public class XmlSerialization
????{
????public bool WriteXml<T>(T model)
????{
????throw new NotImplementedException();
????}
????}
???????????
?????????????????????????????
????????????????????????????????“????”-??“????”-??“???в???”???????????????????????????????С?????????????
???????WriteXml?????:
????public bool WriteXml<T>(T model)
????{
????return true;
????}
???????в?????????????????bool?????????????????????????Assert???????????true??false????Assert????????????WriteXml???????????????????
????[TestMethod]
????public void TestWriteXmlFalse()
????{
????Assert.IsFalse(new XmlSerialization().WriteXml<UserModel>(null));
????}
???????в????????????????????ú??????????????????м???????????????????????????е???????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11