?????????????????
????????????????????????????????衣???????????????????????????????????????С????????????????С??????????????/???????
????????????????????????????????и??????????????????????google??
????????UnitTestFramework
????UnitTestFramework????????????????????????????????????NUnit???UnitTestFramework????????????????????????????????????????VisualStudio????ɡ?
????????Microsoft Fakes
????Microsoft Fakes??UnitTestFramework?μ????????Microsoft Fakes??????????????????????????????/????????????????????????????????????????????????????????????????????????????????????????С?????????????????????????е?????????????????????????????????????????????????????????????????????е????????????????????Щ??????????????????Microsoft Fakes??Microsoft Fakes???????????????????????????Microsoft Fakes???????????????????????????????????????????????????????????????????????
???????Microsoft Fakes?????????а汾??VisualStudio???????????и???汾???????????VisualStudio2015???Enterprice?汾??????
????Microsoft Fakes?????2?????
????stub??
???????stub?????????滻???????????????class???????stub???????????????????????????????????stub?????????????????????????????
????shim??
???????shim?????????滻??????????????????е?????????????????????е???????????shim?????????shim?????????????Щ???????????????????????.NET???????
??????????
????1.???Stub???????
???????VisualStudio?????????????MSFakeSample??

?????????????????????????????????????????????????????????????????????????е???????????????????
????IStudentsRepository
??????????????????Students????????????????

????StudentsService
?????????????????Students??????????

???????????????????????????????????????IStudentsRepository??????????????EF?????????Dapper???????????????ConnectNames??????????????????EF????????IStudentsRepository??????????????????????????????????????????????????????????????????????????????????κ?IStudentsRepository??????仯????????????仯??????????????????????????????????????Щ?仯?????????????????÷????????
????????Microsoft Fakes??????????????????IStudentsRepository??????????????IStudentsRepository??????仯????????????仯??
?????????????????
??????ConnectNames?????????????????????????

????????????????????????????????????????????????????????????+Tests???????????????????????????StudentsServiceTests??