<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to feature-requests</title><link>https://sourceforge.net/p/nmock/feature-requests/</link><description>Recent changes to feature-requests</description><atom:link href="https://sourceforge.net/p/nmock/feature-requests/feed.rss" rel="self"/><language>en</language><lastBuildDate>Fri, 05 Jun 2009 10:55:08 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/nmock/feature-requests/feed.rss" rel="self" type="application/rss+xml"/><item><title>Faking Static Methods</title><link>https://sourceforge.net/p/nmock/feature-requests/24/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Currently, I don't see it's possible to fake static methods which is needed maybe in every project.&lt;/p&gt;
&lt;p&gt;I think the quickest way to implement this is to have a look at the TypeMock assembly code using .NET Reflector, then finding &lt;br /&gt;
out how they are implementing how to fake static methods and finally writing your own customized NMock version.&lt;/p&gt;
&lt;p&gt;I attached the assembly as well (it's free to download and try from their site I believe).&lt;/p&gt;
&lt;p&gt;Pooya&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 05 Jun 2009 10:55:08 -0000</pubDate><guid>https://sourceforge.netd0e79cc3c14de25f489807500e4ea7d8320d1272</guid></item><item><title>Can you provide a .net compact version</title><link>https://sourceforge.net/p/nmock/feature-requests/23/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;it's every encouraging to see this nice &amp;amp; clean solution, any chance to provide a .net compact version?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arno Kan</dc:creator><pubDate>Mon, 25 May 2009 03:57:11 -0000</pubDate><guid>https://sourceforge.net358e4189cade7d8ccda6f8d5c69413101e9355fc</guid></item><item><title>Xml Documentation</title><link>https://sourceforge.net/p/nmock/feature-requests/22/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Plase add Xml documentation to DLLs.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 07 May 2008 21:54:35 -0000</pubDate><guid>https://sourceforge.netc32d152361574e793b8c3896a8b52fdb8774bd5d</guid></item><item><title>Please add Generics Support</title><link>https://sourceforge.net/p/nmock/feature-requests/21/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;NMock2 fails hard with Interfaces that contain generic methods.&lt;/p&gt;
&lt;p&gt;For example adding "X GenericMethod&amp;lt;X&amp;gt;();" to the IHelloWorld interface in the AcceptanceTests causes those tests to fail.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 06 May 2008 14:24:31 -0000</pubDate><guid>https://sourceforge.nete5e4897d3a9cc7d2ed6c6259b117a175dc70e9dd</guid></item><item><title>Add MockEvent support</title><link>https://sourceforge.net/p/nmock/feature-requests/20/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Manicprogrammer has a great article about testing delegates and events with NMock.&lt;br /&gt;
&lt;a href="http://manicprogrammer.com/cs/blogs/willeke/archive/2007/10/17/testing-delegates-with-nunit-and-nmock.aspx" rel="nofollow"&gt;http://manicprogrammer.com/cs/blogs/willeke/archive/2007/10/17/testing-delegates-with-nunit-and-nmock.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The amount logic is fairly, I would really need this to be included "by default" in NMock.&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;br /&gt;
Joannès&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Joannes Vermorel</dc:creator><pubDate>Wed, 19 Mar 2008 09:16:16 -0000</pubDate><guid>https://sourceforge.netb273560cffed202ed49030bfb0d3ada064f50b43</guid></item><item><title>It would be better to sign all NMock assemblies with .snk</title><link>https://sourceforge.net/p/nmock/feature-requests/19/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;For example I need this feature for InternalsVisibleTo attribute - it works only for signed assemblies, so I have to sign my test library with it, but I can not reference NMock2.dll then, because it is unsigned&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 14 Dec 2007 15:38:40 -0000</pubDate><guid>https://sourceforge.net0de3d27908b6b8adef1a714c2df76186101b8f25</guid></item><item><title>Supporting classes as well as interfaces</title><link>https://sourceforge.net/p/nmock/feature-requests/18/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;It would be helpful to support classes as well as just interfaces. Occasionally I had to specifically make an interface to use NMock. I believe there is a minor use case for this.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 16 Oct 2007 07:37:07 -0000</pubDate><guid>https://sourceforge.nete4c920e70383b6329739319a8ee1c4c72f071abf</guid></item><item><title>Enum for method/prop names for expectations</title><link>https://sourceforge.net/p/nmock/feature-requests/17/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Instead of using a string to specify a method or property name in an expecation call, provide an enum with an enumerator list of the names of the methods and properties. That would be safer in that a misspelling won't happen (thought a mis-selection could). It would be more convenient in that Intellisense would list the available methods and properties and allow for auto completion.&lt;/p&gt;
&lt;p&gt;I suppose for overloads, the enum constants could include the arguments in some kind of name mangling, but that seems like overkill.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kareem Fawell</dc:creator><pubDate>Fri, 17 Aug 2007 05:02:14 -0000</pubDate><guid>https://sourceforge.net0f6deb8d8bae869692f81cbad4ee2024d10ec2b3</guid></item><item><title>Provide lazy evaluation of values</title><link>https://sourceforge.net/p/nmock/feature-requests/16/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When setting expectations on object values, it's quite useful to evaluate the expected values in a lazy way, so that the test code has a chance to set the value.&lt;/p&gt;
&lt;p&gt;i.e. consider the case where I'm setting an expectation on a view interface that will check that an argument passed-in matches a value existing on the correponding presenter, which is what's under test:&lt;/p&gt;
&lt;p&gt;Expect.Once.On(view).&lt;br /&gt;
Method("SetDatabaseFilename").With(DatabaseFilename);&lt;br /&gt;
Expect.Once.On(view).&lt;br /&gt;
Method("SetDatabase").With(new LazyEqualsToMatcher(delegate() { return presenter.Database; }));&lt;/p&gt;
&lt;p&gt;presenter.DatabaseFileChanged(Path.GetFullPath(DatabaseFilename));&lt;/p&gt;
&lt;p&gt;Note that it's the presenter action DatabaseFileChanged the one that actually sets the presenter.Database value that we need in order to verify the expectation on the view. Without a lazy evaluation of that property at the time the method is invoked on the view, we have no way of actually setting the expectation. If we had used:&lt;/p&gt;
&lt;p&gt;Expect.Once.On(view).&lt;br /&gt;
Method("SetDatabase").With(presenter.Database);&lt;/p&gt;
&lt;p&gt;The database would have been null at that point, and the expectation would be wrong.&lt;/p&gt;
&lt;p&gt;The LazyEqualsToMatcher is pretty simple:&lt;/p&gt;
&lt;p&gt;public delegate object LazyValueHandler();&lt;/p&gt;
&lt;p&gt;public class LazyEqualsToMatcher : Matcher&lt;br /&gt;
{&lt;br /&gt;
LazyValueHandler valueHandler;&lt;/p&gt;
&lt;p&gt;public LazyEqualsToMatcher(LazyValueHandler valueHandler)&lt;br /&gt;
{&lt;br /&gt;
this.valueHandler = valueHandler;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;public override void DescribeTo(TextWriter writer)&lt;br /&gt;
{&lt;br /&gt;
Is.EqualTo(valueHandler()).DescribeTo(writer);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;public override bool Matches(object o)&lt;br /&gt;
{&lt;br /&gt;
return Is.EqualTo(valueHandler()).Matches(o);&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;It just wraps the Is.EqualsTo matcher but evaluates the property at matching time instead of construction time.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Cazzulino (kzu)</dc:creator><pubDate>Tue, 10 Jul 2007 03:32:45 -0000</pubDate><guid>https://sourceforge.net5a8a9e314a41c314cc31d55d37959b1ccfe970d5</guid></item><item><title>Create DelegateMatcher</title><link>https://sourceforge.net/p/nmock/feature-requests/15/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Create a matcher that receives a delegate that performs the matching. This would avoid creation of custom matchers for many common scenarios (i.e. lazy check on property values, etc.).&lt;/p&gt;
&lt;p&gt;Expect.Once.On(foo).With(new DelegateMatcher(delegate { return bar.Value == "hello"; }));&lt;/p&gt;
&lt;p&gt;Note that with C# 3.0 syntax it will look much better:&lt;/p&gt;
&lt;p&gt;Expect.Once.On(foo).With(new DelegateMatcher(() =&amp;gt; bar.Value == "hello"));&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Cazzulino (kzu)</dc:creator><pubDate>Tue, 10 Jul 2007 02:58:11 -0000</pubDate><guid>https://sourceforge.net417a238580be7b325345eef56e8752d91a204466</guid></item></channel></rss>