<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/dotnetmock/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/dotnetmock/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Sun, 30 Oct 2005 18:42:13 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/dotnetmock/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>MockDataReader.findColumnIndexForName doesn't work</title><link>https://sourceforge.net/p/dotnetmock/bugs/28/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;MockDataReader.cs, lines 516-522 currently read&lt;/p&gt;
&lt;p&gt;for (int i = 0; i &amp;lt; _schemaTable.Columns.Count; ++i)              {&lt;br /&gt;
if (_schemaTable.Columns[i].ColumnName.Equals(name))&lt;br /&gt;
{          &lt;br /&gt;
return i; &lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;They should read:&lt;/p&gt;
&lt;p&gt;for (int i = 0; i &amp;lt; _schemaTable.Rows.Count; ++i)             {&lt;br /&gt;
if (_schemaTable.Rows[i]["ColumnName"].Equals(name))&lt;br /&gt;
{          &lt;br /&gt;
return i; &lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Since schema tables store data about each column&lt;br /&gt;
returned in an IDataReader as a separate row of data&lt;br /&gt;
(per the MSDN documentation on IDataReader).&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Matt (matthinz@nospamgmail.com, minus no spam)&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sun, 30 Oct 2005 18:42:13 -0000</pubDate><guid>https://sourceforge.net79edf4991e54a7c5a52ac768a7ab0b86b4bacae6</guid></item><item><title>ExpectNoCall expects a call</title><link>https://sourceforge.net/p/dotnetmock/bugs/27/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When I call ExpectNoCall("Set") on a DynamicMock,&lt;br /&gt;
Verify() throws an AssertionException: "1 more call(s)&lt;br /&gt;
were expected for Set".&lt;/p&gt;&lt;/div&gt;</description><pubDate>Fri, 15 Jul 2005 12:30:48 -0000</pubDate><guid>https://sourceforge.neta954c179418c717da41b5acce74730dbade39a40</guid></item><item><title>Does not cast return value well</title><link>https://sourceforge.net/p/dotnetmock/bugs/26/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;If your method returns a long and in your expectation&lt;br /&gt;
you specify an int as the return value, the method call&lt;br /&gt;
fails with a "Specified cast is invalid" exception.&lt;/p&gt;
&lt;p&gt;For example, consider the following method:&lt;/p&gt;
&lt;p&gt;long GetLength();&lt;/p&gt;
&lt;p&gt;When we make the following expectation:&lt;/p&gt;
&lt;p&gt;mock.ExpectAndReturn("GetLength", 123);&lt;/p&gt;
&lt;p&gt;and then call it.&lt;/p&gt;
&lt;p&gt;mockObject.GetLength();&lt;/p&gt;
&lt;p&gt;it will fail with a cast exception.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Choy Rim</dc:creator><pubDate>Tue, 10 May 2005 17:36:30 -0000</pubDate><guid>https://sourceforge.net78a4c3f1696e6f92a6731d3c4373a74f7efb68f7</guid></item><item><title>Method Call Requires an Expectation</title><link>https://sourceforge.net/p/dotnetmock/bugs/25/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;We were previously using v.7.2 that allowed for the &lt;br /&gt;
calling of a dynamic mocked interface method without &lt;br /&gt;
an expectation attached to it.  By looking over the &lt;br /&gt;
source, it looks like since v .7.5 this is no longer &lt;br /&gt;
possible.  In the current version, v.7.6, the Call method &lt;br /&gt;
receives an IMethodCallExpectation from the &lt;br /&gt;
nextExpectation method.  This method will return null if &lt;br /&gt;
there are no expectations and you are not strict.  The &lt;br /&gt;
Call method is not handling null being returned and &lt;br /&gt;
therefore you get the NullReferenceException.  In the &lt;br /&gt;
v.7.2 implementation, the code would have been:&lt;/p&gt;
&lt;p&gt;IMethodCallExpectation e = nextExpectation&lt;br /&gt;
(methodCall);&lt;br /&gt;
if (e == null)&lt;br /&gt;
    return null;&lt;/p&gt;
&lt;p&gt;return e.CheckCallAndSendResponse(methodCall);&lt;/p&gt;
&lt;p&gt;Here is a test that fails in the current version:&lt;/p&gt;
&lt;p&gt;public interface ITest &lt;br /&gt;
{&lt;br /&gt;
    void MethodTest();&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;[TestFixture]&lt;br /&gt;
public class TestDynamicMock &lt;br /&gt;
{&lt;br /&gt;
    [Test]&lt;br /&gt;
    public void &lt;br /&gt;
TestDynamicMockMethodWithoutExpectations() &lt;br /&gt;
    {&lt;br /&gt;
        DynamicMock dynamicMock = &lt;br /&gt;
new DynamicMock(typeof(ITest));&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;ITest&lt;/span&gt; &lt;span class="n"&gt;test&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ITest&lt;/span&gt;&lt;span class="o"&gt;\&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;dynamicMock.Object;&lt;br /&gt;
        test.MethodTest();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chad M. Gross</dc:creator><pubDate>Fri, 06 May 2005 20:50:03 -0000</pubDate><guid>https://sourceforge.net2d1d3bfaa782ddd80304b0ada778ddfd0ae5c442</guid></item><item><title>MethodCall::MethodName property has "somewhat-invalid" logic</title><link>https://sourceforge.net/p/dotnetmock/bugs/24/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The code in the MethodCall::MethodName get property &lt;br /&gt;
is like:&lt;/p&gt;
&lt;p&gt;string text1 = this._method.Name;&lt;br /&gt;
if (!text1.StartsWith("get_") &amp;amp;&amp;amp; !text1.StartsWith("set_"))&lt;br /&gt;
{&lt;br /&gt;
return text1;&lt;br /&gt;
}&lt;br /&gt;
return text1.Substring(4);&lt;/p&gt;
&lt;p&gt;It is indicating that if the MethodInfo::Name begins with &lt;br /&gt;
either "set_" or "get_ " it must be a property which is &lt;br /&gt;
not necessarily the case.  Not probably the biggest &lt;br /&gt;
issue you're facing but the code should be :&lt;/p&gt;
&lt;p&gt;string text1 = this._method.Name;&lt;br /&gt;
if ((!text1.StartsWith("get_") &amp;amp;&amp;amp; !text1.StartsWith&lt;br /&gt;
("set_")) || !_method.IsSpecialName)&lt;br /&gt;
{&lt;br /&gt;
return text1;&lt;br /&gt;
}&lt;br /&gt;
return text1.Substring(4);&lt;/p&gt;
&lt;p&gt;/Chad&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chad M. Gross</dc:creator><pubDate>Tue, 03 May 2005 15:40:28 -0000</pubDate><guid>https://sourceforge.netaff17b681338d78da613f1015e54d789078d2514</guid></item><item><title>Incomplete rename in MockObject.cs</title><link>https://sourceforge.net/p/dotnetmock/bugs/23/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;It appears that the most recent checkin of&lt;br /&gt;
MockObject.cs (1.20)  renamed the name variable to be&lt;br /&gt;
_name.  The renaming missed one, specifically in the&lt;br /&gt;
constructor.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Furthermore, it was changed from protected to private.&lt;br /&gt;
This breaks the NewMockObjectFile.cs template files&lt;br /&gt;
(both versions, 2002 and 2003) in two ways:  The&lt;br /&gt;
occurrence of this.name wasn't changed to this._name,&lt;br /&gt;
and it's no longer visible given the change to private.&lt;br /&gt;
The intent of this change isn't clear ot me.&lt;/p&gt;
&lt;p&gt;(This is a good example of why I dislike the leading&lt;br /&gt;
underscore convention - it's too easy to misread.)&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gary Feldman</dc:creator><pubDate>Tue, 26 Apr 2005 02:20:48 -0000</pubDate><guid>https://sourceforge.net7bdc5ccad2a3a9d8d334ac674ce081bd8d7d01a2</guid></item><item><title>Tests fail if decimal symbol is something else than \'.\'</title><link>https://sourceforge.net/p/dotnetmock/bugs/22/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The summary pretty much explains the whole thing.&lt;br /&gt;
I ran the DotNetMock.Tests in NUnit and I get few failing &lt;br /&gt;
tests if the decimal symbol is not a dot, i.e., '.'&lt;/p&gt;
&lt;p&gt;Maybe that's Verify() problem?&lt;/p&gt;
&lt;p&gt;Actually, XP allows you to put anything for the decimal &lt;br /&gt;
symbol, so perhaps you need to use CultureInfo or &lt;br /&gt;
something to get the actual separator.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kari Hirvi</dc:creator><pubDate>Sat, 02 Apr 2005 10:02:37 -0000</pubDate><guid>https://sourceforge.net734e62b3215d59c0e15b2aabf53b142521194937</guid></item><item><title>"N/A" if can't stringify argument</title><link>https://sourceforge.net/p/dotnetmock/bugs/21/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;If predicate on an argument is not satisified,&lt;br /&gt;
DotNetMock will throw and AssertionException and try to&lt;br /&gt;
output the call and arguments in the assertion failure.&lt;br /&gt;
If the argument throws an exception while DotNetMock&lt;br /&gt;
tries to convert it to string, then DotNetMock&lt;br /&gt;
propagates this inner exception outward. Making for an&lt;br /&gt;
extremely confusing message.&lt;/p&gt;
&lt;p&gt;Instead, DotNetMock should produce "N/A" for arguments&lt;br /&gt;
that cannot be stringified.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Choy Rim</dc:creator><pubDate>Thu, 31 Mar 2005 16:41:20 -0000</pubDate><guid>https://sourceforge.net791610ab6aef14af84d3cd2996e77c4233f26d00</guid></item><item><title>Can't simulate rollback in case of commit failure</title><link>https://sourceforge.net/p/dotnetmock/bugs/20/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;1) in your code that you're trying to test, you have try-&lt;br /&gt;
catch block, which catches errors in case of transaction &lt;br /&gt;
commit failure&lt;/p&gt;
&lt;p&gt;2) try to simulate transaction-commit failure by setting &lt;br /&gt;
an exception for the transaction mock object&lt;/p&gt;
&lt;p&gt;3) the commit fails and control moves to the catch block&lt;/p&gt;
&lt;p&gt;4) but you can't use mock rollback, because it detects &lt;br /&gt;
that the mock commit-method has been executed and &lt;br /&gt;
throws an exception.&lt;/p&gt;
&lt;p&gt;The mock transaction should detect if the commit is &lt;br /&gt;
forced to throw an exception and allow to rollback later.&lt;/p&gt;
&lt;p&gt;Is the current behaviour bug or feature ?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kari Hirvi</dc:creator><pubDate>Thu, 31 Mar 2005 12:44:47 -0000</pubDate><guid>https://sourceforge.net5de311b3df78be352593d6bab349db76d5de949f</guid></item><item><title>Assertion Failure causes exception in MbUnit</title><link>https://sourceforge.net/p/dotnetmock/bugs/19/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;DotNetMock.Assertion.AssertEquals(String message, &lt;br /&gt;
Object expectedObject, Object actualObject)&lt;/p&gt;
&lt;p&gt;Generates a call to&lt;br /&gt;
MbUnit.Core.Framework.Assert.AreEqual(Object &lt;br /&gt;
expected, Object actual, String format, Object[] args)&lt;br /&gt;
(with args == null)&lt;/p&gt;
&lt;p&gt;If this assertion fails then an ArgumentNullException is &lt;br /&gt;
thrown in&lt;/p&gt;
&lt;p&gt;System.String.Format(String format, Object[] args)&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 16 Mar 2005 20:50:33 -0000</pubDate><guid>https://sourceforge.net2e6affcbe462bf4eb637fc3a40027a4c68618a63</guid></item></channel></rss>