Welcome to MSDN Blogs Sign in | Join | Help

May 2007 - Posts

Code As Dependency Configuration

In his article on Inversion of Control and Dependency Injection , Martin Fowler has a quite interesting section towards the end where he talks about how to configure loosely coupled systems. One of his points is that in some cases, it makes more sense

Reasons For Isolation

Object-oriented applications above some level of complexity are almost always modelled as a layered architecture. While the typical three-layer architecture remains the most widely known, n-layer architecture is also often utilized. Here's a typical design

Authorizing Services

If you look at the default authorization model for WCF, you will notice that it expects you to implement centralized authorization. While centralized and pluggable authentication makes a lot of sense to me, that's not the case with authorization. Does
Posted by ploeh | 4 Comments

Testing Against The Passage of Time

This is the fourth in a small series of posts about testing against non-determinism. In this installation, I'm going to cover the passage of time. In my former post , I demonstrated how you can use the Provider Injection pattern to decouple your test

Testing Against The Current Time

This is the third in a small series of posts about testing against non-determinism. In this installation, I'm going to cover how to deal with the current time or date. If you have logic that is dependent of the current time or date, test results will

Testing Against Guids

This is the second in a small series of posts about testing against non-determinism. In this installation, I'm going to cover Guids. Despite sharing some similarities with random numbers, Guids actually turn out to be a lot less difficult to use in unit
Posted by ploeh | 5 Comments
Filed under:

Testing Against Randomness

This is the first in a small series of posts about testing against non-determinism. In this installation, I'm going to cover randomness. When code paths are selected at random, the outcome of a unit test may not be deterministic. Consider this example:

Testing Against Non-Determinism

Although computers tend to be rather deterministic in nature, you will sometimes have to deal with concepts that are de-facto non-deterministic. These include, but are not limited to: Random numbers. These are typically generated by a random number generator
Posted by ploeh | 4 Comments
Filed under:
 
Page view tracker