??????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 --- ??????

???????????????????????????????????????????????????????????????????????????????????£???д?????????????????????????????????????????????????????????????????????????????????????????γ????????????????????????????????????????У??????п??????б??????????????????????м??????????????????????????????н????й??????????????Щ????????????????????????????????????е????????????????