The Smell of Assertionless Tests

Today I found myself at a crossroads regarding testing. In my efforts to have pure unit tests, I had created tests with no assertions. Each test contained a mock object that verified multiple expectations, but no assertions. While each mock expectation could be thought of as an assertion, is it really a good idea to test the algorithm?

I say no.

The algorithm shouldn’t matter. The only thing that should matter is the input and output of each function.

Now I found my tests are much more stable and not nearly as much of a pain to write. I am setting up my expectations for input and output, but not regarding how to get there.

As you might expect though, the tests aren’t isolated to one class. They cross a few class boundaries, but not layer boundaries.

Have I traded one evil for another? I honestly don’t know, but I am going with my gut, and what makes sense. Having no assertions isn’t right in my opinion. What do you think?

The On Demand Revolution Continues – PlayOn

A few weeks ago, a co-worker showed me PlayOn. Installing it at home was more important than dinner that night. Luckily it only took about 5 minutes to get it working and I was able to eat pizza while watching the On Demand Tube.

PlayOn is a simple UPNP server you install on any Windows computer in your home. Most game consoles, like my Xbox360, see the media server on the network and allow you browse all of PlayOn’s content.

What content you might ask? Hulu, CBS, Netflix, ESPN, and YouTube. Wow.

Bringing the content of the web directly to the living room is yet another step towards a completely on demand world. Paying for 100 channels I don’t watch so that I can get the 10 I do makes no sense to me. Why can’t I just pay for what I want? And why can’t I watch what I want whenever I want?

If you have an Xbox 360, Wii, or PS3, you should go try PlayOn today.