Skip to content

Commit

Permalink
Fixed the reference to Jeremy's article Isolate The Ugly Stuff
Browse files Browse the repository at this point in the history
Fixes #21
  • Loading branch information
dennisdoomen committed Sep 13, 2015
1 parent 72735ca commit 1108713
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Guidelines/1100_MemberDesignGuidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Similarly to rule AV1000, a method should have a single responsibility.

A stateful object is an object that contains many properties and lots of behavior behind it. If you expose such an object through a static property or method of some other object, it will be very difficult to refactor or unit test a class that relies on such a stateful object. In general, introducing a construction like that is a great example of violating many of the guidelines of this chapter.

A classic example of this is the `HttpContext.Current` property, part of ASP.NET. Many see the `HttpContext` class as a source of a lot of ugly code. In fact, the testing guideline [Isolate the Ugly Stuff](http://msdn.microsoft.com/en-us/magazine/dd263069.aspx#id0070015) often refers to this class.
A classic example of this is the `HttpContext.Current` property, part of ASP.NET. Many see the `HttpContext` class as a source of a lot of ugly code. In fact, the testing guideline [Isolate the Ugly Stuff](http://codebetter.com/jeremymiller/2005/10/21/haacked-on-tdd-and-jeremys-first-rule-of-tdd/) often refers to this class.

### Return an `IEnumerable<T>` or `ICollection<T>` instead of a concrete collection class (AV1130) ![](images/2.png)

Expand Down

0 comments on commit 1108713

Please sign in to comment.