Over the weekend I went along to the fantastic DeveloperDeveloperDeveloper day held at Microsoft up in Reading. The quality of the presentations was fantastic and even for frameworks/subjects I was familiar with I learnt loads. For me, the most useful presentation came at the end of the day (just as the brain was beginning to shut down due to information overload). Simon Sabin (from SQL Know How) presented “Things you should know about SQL as a . . .
By default objects mocked using MOQ will handle calls to method/properties that have not been defined, which 99% of the time will be the desired behaviour. Occasionally however a situation will require that MOQ throws an exception when accessing an undefined method or property. The MOQ framework provides this functionality via the MockBehavior enum but this can only be set during the construction of the mocked object. Typically this won’t cause any problems as the . . .