?????????????---????????????
???????????? ???????[ 2013/3/26 9:53:28 ] ????????
??????MSpec???????????????????Establish?? Because?? It??????????????????????????????????
??????????
public class When_create_an_exam_by
{
private Establish context =
() =>
{
stub_exam_def = new ExamDef("98");
stub_district = new District("01");
stub_date = new Date(2011?? 1?? 1);
};
private Because of =
() => subject = new Exam(stub_district?? stub_exam_def?? stub_date);
private It should_assign_to_properties =
() =>
{
subject.District.ShouldEqual(stub_district);
subject.ExamDef.ShouldEqual(stub_exam_def);
subject.Date.ShouldEqual(stub_date);
};
private static ExamDef stub_exam_def;
private static District stub_district;
private static Date stub_date;
private static Exam subject;
}
?????????????????е???????????????????????
???????????
??????nUnit??????MSpec?????????????μ?о????????????Щ????????????????????????????????
????Rhino Mock --- ??????
???????????????????????????????????????????????????????????????????????????????????£???д?????????????????????????????????????????????????????????????????????????????????????????γ????????????????????????????????????????У??????п??????б??????????????????????м??????????????????????????????н????й??????????????Щ????????????????????????????????????е????????????????
??????
???·???
??????????????????
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