Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last readme example is incorrect. (Latest nuget package) #7

Open
jgauffin opened this issue Aug 13, 2012 · 1 comment
Open

Last readme example is incorrect. (Latest nuget package) #7

jgauffin opened this issue Aug 13, 2012 · 1 comment

Comments

@jgauffin
Copy link

The current code do not work:

var context = new FakeHttpContext();
var uri = new Uri("http://www.google.com/");

//set the UrlReferrer
context.Set(ctx => ctx.UrlReferrer, uri);

There is no Set() method which takes a lambda expression.

@mikevalenty
Copy link
Owner

The NuGet package was out of date with the documentation. I just pushed an updated NuGet package so the follwing syntax should work now:
 
new FakeHttpRequest().Set(ctx => ctx.UrlReferrer, new Uri("http://google.com"));

----- Original Message -----
From: Jonas Gauffin [email protected]
To: mikevalenty/faken [email protected]
Date: 8/13/2012 1:48:22 AM
Subject: [faken] Last readme example is incorrect. (Latest nuget package) (#7)

The current code do not work:
var context = new FakeHttpContext();
var uri = new Uri("http://www.google.com/");

//set the UrlReferrer
context.Set(ctx => ctx.UrlReferrer, uri);

There is no Set() method which takes a lambda expression.
— Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants