Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
where we have to use mock class.
Posted

 
Share this answer
 
v2
Mock is the Typemock Isolator mock type controller, this class is use for managing the virtual mocks
Namespace: TypeMock
Assembly: TypeMock (in TypeMock.dll) Version: 7.1.6.0 (7.1.6.0)

Mock object have 3 stages.
Set Up - This is the stage where you 'record' what the mocked type/object expects to do and what to return
Run - Run the actual class under test
Verify - Make sure that the mocked object acted as expected
These phases are managed by the Mock object.
Note: You cannot create a Mock directly use MockManager.Mock(Type)
Note: You cannot mock Interfaces Classes, Use MockManager.MockObject(Type, Object[])
Note:When mocking a method that is declared in When mocking a method that is declared in a base class, Typemock Isolator will only mock that method when called from the mocked type. When a base method is mocked and a derived class calls that method, it WON'T be mocked
 
Share this answer
 
 
Share this answer
 
Hi,

Have a look here:
Introduction to Mocking[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900