Thanks for your reply. Now, about your first question of making a strict mock of Environment
class. As this is a framework class (belonging to the MsCorlib assembly), you need to do Mock.Partial
(as mentioned in the last post) during the test initialization. Unfortunately, it's not currently possible to create strict mock of the Environment
class. But we have a plan to add the following syntax for Mock.Partial
so that it is also possible to create strict mock of Environment
like classes using Mock.SetupStatic(typeof(Environment), Behavior.Strict).
After this, in the test class you will be able to create a strict mock of the Environment
class through Mock.SetupStatic
as specified above. This is queued in the backlog already and hopefully it will be available soon.
Secondly, it seems from your specification that you are looking for a Record -Replay support in Justmock. JustMock is based on AAA syntax that is simple and easy to read and maintain, whereas Record-Replay is quite opposite to what AAA stands for. You might like to check the following interesting posts on this:
But, there is a good news that we have decided to add the Record-Replay support to JustMock as well under Telerik.JustMock.Legacy
namespace which will also be available soon.
Hope this information helps.
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking
system and vote to affect the priority of the items