?????????????---????????????
???????????? ???????[ 2013/3/26 9:53:28 ] ????????
???????nUnit???????
?????????????????????????????????????????в????ι??????????……?????й??????У??????????????
????????????????????????????????????????????????
????????????????????????????????????????ò?????????????????1?????????????---????????2??????????????????е?---????????
??????????
[TestFixture]
public class when_create_an_exam
{
[Test]
public void it_should_assign_parameters_to_properties()
{
//Arrange
var stub_exam_def = new ExamDef("98");
var stub_district = new District("01");
var stub_date = new Date(2011?? 1?? 1);
//Action
var subject = new Exam(stub_district?? stub_exam_def?? stub_date);
//Assert
Assert.AreEqual(stub_district??subject.District);
Assert.AreEqual(stub_exam_def??subject.ExamDef);
Assert.AreEqual(stub_date??subject.Date);
}
}
?????????????м???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Stub??????????????DDD????????????????????????????????ж??????????????????????????OK??????
??????ζ????---????????
????????????????????????????β????????ЩСС?????????????????и?????????????????????????????и???????????????????????????????????????????????????????????????????ЩСС??????????????
????????????????????
????1??????????????????????????????????????(????????)???????????????????????????????????????????????飬?????????????????
????2????????????????????????????????????---???????????????Exam?????ExamDef?? District??????????????
????3????????????????????????????У?????????????????????????????????????????????????????y?????
???????????????????????????????????????????3???????????????????“???????”??
????MSpec??????--- AAA??
?????????????????????????????????????????Щ?????????????????????????????????????????bug??????????????????????????????????д???????
?????????????????????????????????????nUnit??????????????????γ????????????????????????鷳???????????MSpec???????????????и????????AAA?????????Arrange??Action??Assert??3A?????????
??????
???·???
??????????????????
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