ASP.NET News from Blogger:
Mehfuzs WebLog
Total News: 70
This will post will show how you can use AutoBox to easily write a bootstrapper for ASP.NET MVC. I have used the latest version of AutoBox (available from nuget, this version also includes Castle.Wind...
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...
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 t...
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 Its sometimes confusing and often does ...
Just when we have dependencies for a controller, we need to wrap around our heads to write a bootstrapper that will dynamically inject dependencies for a controller in runtime and once we we want to d...
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...
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 w...
I have came across this several times in forum (telerik) on how I can really fake an item yet I dont want to pass the instance as an argument. Ideally, this is not a best design but there are third- p...
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 initializi...
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 ar...
Often we end up in a situation where constructor call on the target type requires us to include a config file in our test project or requires firing up some external process. To better illustrat...
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 mo...
When writing a custom LINQ provider, developer must focus into plenty of issues other than the main purpose of just creating a LINQ to something. Like how to deal with projection, how to parse va...
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 G...
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...
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 dont know what F# is all about, Its a product from Microsoft research an...
After making the post on mocking LINQ to SQL, this morning i was having a chat with Stephen forte and come to know that telerik a has product named RLINQ. RLINQ is built on top of OpenAccess and it su...
Unit testing LINQ to SQL repositories can be very challenging. Unit testing such requires faking hard to mock classes and requires simulation to return your custom data for a particular LINQ statement...
Previously, i made a post showing how you can leverage the dependent interfaces that is implemented by JustMock during the creation of mock instance. It could be a informative post that let you ...
In this post , i show how you can benefit from sequential mocking feature[In JustMock] for setting up expectations with successive calls of same type. To start lets first consider the foll...
In this post, i will be showing how you can mock property sets with your expected values or even action using JustMock. To begin, we have a sample interface: public interface IFoo { int Value { g...
In this post , I will cover a test code that will mock the various elements needed to complete a HTTP page request and assert the expected page cycle steps. To begin, i have a simple enumeration...
In this post, i will be digging in a bit deep on Mock.Assert. This is the continuation from previous post and covers up the ways you can use assert for your mock expectations. I have used another trad...
In this post, i will start with a more traditional mocking example that includes a fund transfer scenario between two different currency account using JustMock.Our target interface that we...
Ill be speaking at the Great Indian Developer Summit from April 20 23 at the Indian Institute of Science in Bangalore (Bangaluru), India. This will be my first ever to the GIDS and hopefully it...
In my previous post, i enhanced the proxy to support generic calls. In order to minimize IL emit and move more parts to managed code, there is a better way to process the return value rather doing the...
In my previous posts, I showed how to create a proxy that can delegate calls. I further modified it to support argument list from original method and handled scenarios for void and non-void calls. In ...
In this post i am going to show how you can write your own proxy for delegating calls. This just shows a way how you can handle it on your own but for complex interceptions its always wise to use alph...
Yesterday , i was reading Clean Code by Uncle Bob. While i was doing so , i came across a line that really stuck my thought patterns and i would like to share it with my readers as well. The line loo...
In my previous post , i mentioned about configuring Team build along with XUnit without installing anything on the build machine. This is sometimes useful as the build machine is miles away and is sha...
Recently, while i was setting up TFS build [to enable CI] for a project at Telerik that i am currently working on, i came across configuring it up with XUnit for doing automated tests every time someo...
Now , it happens that you go to McDonalds website order an item for you. It could happen that price of the menu changed or new one comes to the menu. Now, generally it can happen that admin can go tho...
In the last post i said about LinqtExtender implementing necessary property and injecting specific settings for entity objects. The issue i have is that it works fine under full / high trust settings ...
While developing LinqExtender, i have come across various scenarios that people dont want to extent any query class or even implement any interface. Also, it is almost absurd when they have to add new...
In a post few month back , i showed how can i simulate a callback using JQuery and ASP.NET with my experimental FlickrXplorer project. More detail on this can be found at the following URL http://web...
In this post, i will show how you can generate SQL programmatically from M. Now, so far i have learnt that MGrammer is a contract that converts users input into MGraph. Now, Oslo by default comes with...
Just released LinqExtender 2.0. Over previous release , it contains generally bugs fixes. Overall, I have focused on striping out complexity as much as possible to keep you focused on your business lo...
In my last post, I showed how to turn on Amazon S3 support in Sitefinity. In this post, I will show how to create a simple video site using the video library support that is bundled with 3.6 release. ...
Here at Telerik, Sitefinity team is preparing for the 3.6 release next week. 3.6 comes with lot of core level enhancements and cool new features. Of which , I can't but mention one feature that will m...
In this post, I will show how to cook an LINQToTwitter library with LinqExtender. My target is to create it easily and over existing twitter API. I used Yedda Twitter library. Yedda library basically ...
There could be plenty of reasons that you might need to do a cross domain web request in your application. One could be let's say you want to divert the resource pressure from your server to some thir...
This happens to be the first PDC for me. This year a lot of new technologies has been unveiled during the keynotes. One of the most focused is the Windows Azure. This happens to be the one stop shop f...
Finally, PDC 2008 is going to roll on this Monday, when the Ray Ozzie will start the day with his keynote. This year there will be quite a new things to be announced during...
I just made a quick update to the existing release of LinqExtender. I recently found a bug while building a feature for FlickrXplorer is that if you use constant type query with orderby clause it does...
It is now official with Scott Guthrie's post that jQuery will be bundled with Asp.net. jQuery is a tiny 15K JavaScript library that contains features from UI tweaks, DOM manipulation to full Ajax cont...
In the flickr explorer app made with Asp.net MVC and Athena, I was trying out some form post scenarios. In this post, I will add few things regarding MVC form post and Ajax that is common to FlickrXpl...
In part one of this packing series I have shown, how you can automate your build process, test and optionally mock by using the popular .net deployment tool NAnt. If you don't know what I am talking a...
In this part, I show a way to build and deploy your project using NAnt. As, you already might know that NAnt is a tiny deployment tool that enables you to create a deployment package with some *...
We are making a sample application, demo or startup kit or a toolkit with test project that requires some SQL scripts. We generally ship in a readme.txt that says it all. But hey, how about having the...
Its been quite a while since I made any release of the toolkit. I basically, get into user requests, used it myself in LinqToFlickr project and came up with some new features and enhancements. In my ...
View Other bloggers