Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

added example on how to use the Set<T> extension method

  • Loading branch information...
commit 55d24253b69a8fe57096ee21dc24111a512b149a 1 parent eecb1c4
@tmont tmont authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 README.markdown
16 README.markdown
@@ -90,3 +90,19 @@ public void User_can_be_authenticated_with_convenience_method()
+You can also set any virtual property from one of the `Http*` classes, even those that aren't explicitly settable. e.g., for `HttpContext`:
+var context = new FakeHttpContext();
+var uri = new Uri("");
+//set the UrlReferrer
+context.Set(ctx => ctx.UrlReferrer, uri);
+//get the UrlReferrer
+Console.WriteLine(context.UrlReferrer); //<>
+This means no more `NotImplementedException`s in your tests.
Please sign in to comment.
Something went wrong with that request. Please try again.