Monthly Archives: Июль 2011

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..

Writing the first test for a Real System, Part II

Guilt. That's what I've been feeling all these days.

Ok, it's not that I spent the past month in a deep depression. I should confess that I'm not that kind of guy. But naming a post "blah blah part I" is kinda making a commitment. And the longer I kept postponing writing the second part, the worse I was feeling about it. So, I finally decide that I won't leave my workplace until I finish it.

In Par...Read more..

Fixing the jQueryUI dialog height in IE, the Quirks way

Today I had some fun trying to figure out how to fix the height of the jQueryUI dialog. The client wanted it to be exactly 500px. Or something that resembled 500px. Anyway, it definitely shouldn't have been from the top to the bottom of the screen. Although I sure set it to 500.

The fun part is that it had to work in IE7-9, but in *quirks* mode. The client won't switch to the standards mode, since the site (made in early 2000's, tables inside tables all the way down) would break ap...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..

Configuring your assets for FubuMVC

When you have a complicated View, things can easily get messy. A View may have several Partials, each Partial being reused in several Views. Each Partial might require certain library scripts, which in turn might depend on other scripts.

(At this point, I stopped and thought, maybe I should really add images to my posts. Ayende does it, although he has clearly no time for finding an appropriate image. All the cool guys do it. Perhaps I should do it, too.)

Read more..

Writing the first test for a Real System

So, you've read a book on TDD, a couple of blog posts from the gurus, and maybe even done the Calculator Kata several times. Now it's time to apply your knowledge to a Real Life Project that you are starting today. You probably stare at the empty solution and try to figure out where to start. "Create an instance of the System Under Test".. which system? "Mock or stub the dependencies".. which dependencies?

Sounds familiar?

Let me give you a hand

Right now I'm also...Read more..

Ripple, the utility that saves you from your personal NuGet hell

Managing your dependencies with NuGet can be just fine.

Unless you want some of these be compiled locally.

For example, imagine that you have a complicated dependency graph, and you've just modified a source of one of the assemblies. Or you just want the freshest bits from the source control. Now you want to use the local version in your project, since you don't want to wait till your modification is accepted and released as a NuGet package. At the same time, you want to ...Read more..

Getting started with Jasmine tests in FubuMVC applications

 

Jasmine is one of the most popular BDD-style Javascript testing frameworks. I decided to use it for my new project, Chpokk, built on top of FubuMVC. Here are the steps that I made, together with some for-dummies explanations.

Adding Jasmine to your project

is as easy as adding the FubuMVC.TestRun...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..

Latest news

Latest blog posts

Powered by FeedBurner