You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MoQ Discussions
Hi
I'm using WCSF and I'm trying to mock the access to the session (I
think the same apply to MVC). An IHttpContext interface exposes the
Session property. Naively, I'm trying to set-up my mock with the
following code
Am I setting the wrong expectation or is moq not supporting the object
this[string name] property signature?
Thanks
Phil
Daniel Cazzulino
unread,
May 1, 2008, 9:50:18 AM5/1/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to moq...@googlegroups.com
we need to improve support for indexers. for now, if you need to mock the getter for the indexer, just use Expect(...) Typically that's what you want to mock, the getter rather than the setter...
philipp...@gmail.com
unread,
May 6, 2008, 2:27:14 PM5/6/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MoQ Discussions
I ended up creating a hand coded mock for my needs since I really
wanted to ensure that people would properly set some values inside the
session when a certain method is called.