Where was the stubbing part in Moq?

Posted by: eXtensible mind, on 19 Nov 2008 | View original | Bookmarked: 0 time(s)

In my very recent previous post I said "mocking and stubbing easier than ever", but actually forgot to mention the stubbing part :S. This one is not new for users of moq-contrib, but we decided to move this to the core Moq library as we get the question on how to stub properties often enough... :) It's actually rather simple and easy to implement just by using Moq external API, but as a facility, here's what you can do:var mock = new Mock<IHaveValue>(); // start "tracking" sets/gets to this...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Debugger | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1486 | Hits: 31

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD