Hi please some explanation on the following
Mock mock=MockManager.Mock(typeof(Hashtable));
mock.Strict=true;
Hashtable hashtable=new Hashtable();
hashtable.Add("","");
not expected to pass but it does :?:
Hi,
You are very thorough! :) , Well this is by design, There are some basic types that cannot be mocked. This is because the TypeMock framework itself uses these objects, and mocking them will cause an infinit recursion that will lead to a stack overflow. These are mainly from the root System namespace. We actually should have failed the Mock and told you that these cannot be mocked, but we haven't though of any reason that someone would want to Mock these types -
They are fast, they work well, they implement interfaces.
Can you tell me why you want to mock the hashTable?