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...
View ArticleAssert 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...
View ArticleAsserting 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...
View ArticleFuture 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...
View ArticleFuture 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...
View ArticlePostSharp and JustMock side by side.
In this post I will show mocking a member call inside a PostSharp aspect. There were previously compatibility issues between both of the tools running side by side which is now been officially fixed...
View ArticleFake a member without passing the instance via dependency
I have came across this several times in forum (telerik) on how I can really fake an item yet I don’t want to pass the instance as an argument. Ideally, this is not a best design but there are third-...
View ArticleRunning 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...
View ArticleMocking 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...
View ArticleMocking constructor
While unit testing a target type, it is likely that the test is failing during object creation because we forgot to include a mandatory configuration file or a line in the constructor is throwing...
View ArticleNuGet JustMock
As most of us already know JustMock got a free edition. The free edition is not a stripped down of the features of the full edition but I would rather say its a strip down of the type you can mock....
View ArticleHow to raise event for a mocked call.
Recently, while i was working with a support issue , i found this interesting piece of test code that i would like to share here. This is actually written by Stefan Lieser (clean code developer from...
View ArticleMocking SPContext.Current with JustMock
Today, I happen to find an interesting post on mocking SharePoint context using TypeMock. Being a JustMocker, i thought rather to follow the footsteps and see if can do the same with JustMock. I am no...
View ArticleBack to school : Getting to know F#
This post starts with a basic introduction of F# and finally ends up writing a simple unit test for an F# member. For those who don’t know what F# is all about, Its a product from Microsoft research...
View ArticleFiddler and IE7
Do you use Fiddler to inspect the HTTP traffic? You may be faced with the following problem: since we started using the beta of the IE7 browser we started experiencing problems when monitoring the...
View ArticleRadMediaPlayer for Silverlight CTP is now live!
We are very happy to announce the official CTP of “RadControls for Silverlight” suite. Telerik is the first control vendor to give you a real Silverlight 1.0 controls which you can play with and use in...
View ArticleFree Distribution of RadControls for Silverlight 1.0
I am now pleased to announce immediate availability of the public Beta of RadControls for Silverlight. Telerik is really eager to promote the Silverlight technology in the community and we have decided...
View ArticleNever access the controls collection in Page_Init or Page_PreInit with...
If you have a GridView, DataGrid, DetailsView, FormView, DataList or Repeater bound using DataSourceID you should never touch the controls collection in Page_Init or Page_PreInit. If you do this your...
View ArticleWhat will come with RadGrid "Prometheus" Q1 2008?
In a series of posts I will walk through some of the new features for RadGrid for ASP.NET AJAX Q1 2008. Here is the first part: - Global ItemTemplate for GridTableView - (CardView): Using ItemTemplate...
View ArticleIE strikes again
After the MIX announcement about IE8 I immediately downloaded the beta to check how RadGrid behaves. Unfortunately, it seems that TABLE elements are not fully implemented and this leads to a lot of...
View Article