Subscribe in a reader

 

Archive for tag: Asp.Net MVC

Testing async requests, mocking async methods with new Ivonna

For those of you who can't wait to start testing async requests, here's the good news (and no, there are no bad news in this post): starting with the 3.1 version of Ivonna, you can test them with the same syntax as before, i.e. using either session.Get(url) or session.GetPage(url).

However, this is not the end of the story. Most of the time you use the async pattern for a reason. You have a lengthy operation in your Web code...Read more..

A binder that breaks the rules

There are many binders in my big rusty toolchest. Some are good boys (and girls), others just like to misbehave. I mean, they do what they're destined for, and they do it really good, but in the process of doing it they break one or several Holy Laws that our Holy President wants us to abide by.

Nobody complains though.

This particular one saves me a lot of repetitive coding

Web requests tend to contain simple values. We developers like to work with objects. We li...Read more..

Custom Asp.Net Model Binders series, part 3: Subclassing your models

This is the third part in the series about custom Asp.Net MVC Model Binders and Value Providers. Part 1 is about two ways of using DateTime.Now as an Action Method parameter for better testability, and Part 2 is about building a Value Provider for the Http Header values. Read on.Read more..

A useless custom Asp.Net value provider (or maybe not that useless after all)

So, following my previous post on implementing a custom Asp.Net Value Provider, here is another one.

Request Header Value Provider

Here is a totally useless requirement: add a Value Provider that would let you use your request headers in your actions without calling HttpContext.Current.Request (or something equally unacceptable). This is actually absurdly simple, because we alread...Read more..

Custom Asp.Net Model Binders series, part 1: Now How

Recently I started a challenge on LinkedIn: let's write blog posts about custom model binders, view results, and other extensible stuff in Asp.Net MVC; let's do it one post a day for a week and see what happens. Presumably, it should benefit everybody, especially Asp.Net MVC newcomers.

Well, I'm two days late already, and I don't feel like doing a big post today, so today's a really simple...Read more..

More secret plans revealed

I've received some shocking news from one of our brave spies in Ivonna Labs.

Yes I know it's a lame joke. But I'll pretend my backspace key is broken, and leave it here.

Anyway, now that you're entertained a little, I'm providing some boring info. The MVC bits in the new Ivonna version will come as a separate assembly.

Actually, three of them. The reason is sim...Read more..

Getting ready for breaking changes in Ivonna v.3

Ivonna was conceived during the dark times, when the WebForms framework ruled the Asp.Net development. Sure there was MonoRail, but only a few alpha geeks actually used it. For 99% developers, Asp.Net was equal to WebForms.

Ivonna also suffered from me not seeing a clear distinction between the framework and the runtime. As a result, its core classes have been tightly coupled to WebForms specific ones, and compatibility with all other f...Read more..

58 things you always wanted to test in Asp.Net MVC, but were afraid to

When they sell you improved testability in Asp.Net MVC, they usually cite the foundational ScottGu's post and write a cute unit test for a controller. With all these beautifully hand-crafted mock authentication services and built-in Http***Wrappers.

Wow!

While it's certainly a big step in the right direction, compared to WebForms' codebehind, let's face the truth: it's far from ideal. While testing Binders and Action filters is doable, it requires ridiculou...Read more..

Archives

Latest news

Latest blog posts

Powered by FeedBurner