Ignore base call method

25/03/2013 13:27

//Ignore Call base.OnLoad and base.OnInit in Unit test

//We use base.Onload in CustomAscxUserControl class

//Double 'CallBase.CallBase' is used because CustomAscxUserControlHelper inherits from CustomAscxUserControl.

 

var mock = MockManager.Mock(typeof(CustomAscxUserControlHelper));

mock.CallBase.CallBase.ExpectCall("OnLoad");

mock.CallBase.CallBase.ExpectCall("OnInit");

 

IMPORTANT: target instance (new CustomAscxUserControlHelper) has to be created AFTER this mock.