Mehfuz's WebLog

Live crazy, think different!

Sponsors

News

Passionate about cutting edge technologies and facinated by the modern web and phone revolution.Currently working at Telerik Corporation, the leading .net component vendor.
Follow me


Articles


Projects

Browse by Tags

All Tags » Mocking (RSS)
Auto Mocking using JustMock
Auto mocking containers are designed to reduce the friction of keeping unit test beds in sync with the code being tested as systems are updated and evolve over time. This is one sentence how you define auto mocking. Of course this is a more or less formal...
Mscorlib mocking minus the attribute
Mocking .net framework members (a.k.a. mscorlib) is always a daunting task. It’s the breed of static and final methods and full of surprises. Technically intercepting mscorlib members is completely different from other class libraries. This is the reason...
Assert the order of expected calls over instances
How you assert through unit test that an user is authenticated before doing withdraw operation? You can surely verify a method is invoked as expected but if you want to ensure the order right then you might require a little more. JustMock lets you specify...
Asserting a mock with test framework
When asserting an expected call for its number of occurrences or may be just to verify if the setup/arrange is acted as intended, the tool generally raises assertion that points us to the reason why the test failed. Different mocking tools use different...
Future mocking with #IgnoreInstance
In my previous post, i showed how JustMock picks mock expectations based on current context without the instance being injected. Based on feedback we found that It’s sometimes confusing and often does not work as intended. However, the context of this...
Posted: Dec 02 2011, 05:36 PM by mehfuzh | with no comments
Filed under: , , ,
Future mocking revisited
Previously , I have posted how it is possible to mock a method without passing the dependency through a constructor / calling method. This is something true for third party controls and tools where we have little control over how its created. You can...
Posted: Sep 30 2011, 07:06 PM by mehfuzh | with 3 comment(s)
Filed under: , , ,
Running JustMock profiler outside of Visual Studio
In this post , I would be focusing on the issue that generally comes to query on how to run JustMock with standalone tools like nunit or msbuild console. Since mocking concrete method works initializing the .net profiler that is set using two variables...
Posted: May 24 2011, 09:54 PM by mehfuzh | with no comments
Filed under: , , ,
Mocking MsCorlib members
In this post , I will show how you can mock  members from MsCorlib. This is more of an introductory post and shows what you need to do in order to successfully mock an MsCorlib member. If you are planning to mock File or DateTime then the process...
More Posts