You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(31) |
Dec
(26) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(8) |
Feb
(27) |
Mar
(15) |
Apr
|
May
(2) |
Jun
(13) |
Jul
(59) |
Aug
(48) |
Sep
(9) |
Oct
(4) |
Nov
(24) |
Dec
|
| 2004 |
Jan
(24) |
Feb
(2) |
Mar
(12) |
Apr
(9) |
May
(4) |
Jun
(26) |
Jul
(20) |
Aug
(23) |
Sep
(13) |
Oct
(31) |
Nov
(23) |
Dec
(11) |
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
(19) |
May
(64) |
Jun
(7) |
Jul
(20) |
Aug
(1) |
Sep
(6) |
Oct
|
Nov
(3) |
Dec
|
| 2006 |
Jan
|
Feb
(69) |
Mar
(18) |
Apr
(1) |
May
(4) |
Jun
(3) |
Jul
(27) |
Aug
(19) |
Sep
(12) |
Oct
(3) |
Nov
(13) |
Dec
(6) |
| 2007 |
Jan
(20) |
Feb
(17) |
Mar
(1) |
Apr
(3) |
May
(4) |
Jun
(11) |
Jul
(10) |
Aug
(24) |
Sep
(19) |
Oct
(13) |
Nov
(8) |
Dec
(7) |
| 2008 |
Jan
(54) |
Feb
(24) |
Mar
(11) |
Apr
(35) |
May
(13) |
Jun
(10) |
Jul
(30) |
Aug
(18) |
Sep
(21) |
Oct
(18) |
Nov
(40) |
Dec
(76) |
| 2009 |
Jan
(64) |
Feb
(23) |
Mar
(15) |
Apr
(23) |
May
(46) |
Jun
(25) |
Jul
(31) |
Aug
(7) |
Sep
(7) |
Oct
(6) |
Nov
(15) |
Dec
(19) |
| 2010 |
Jan
(13) |
Feb
(8) |
Mar
(6) |
Apr
(4) |
May
(8) |
Jun
(7) |
Jul
(3) |
Aug
(9) |
Sep
(6) |
Oct
(15) |
Nov
(3) |
Dec
(5) |
| 2011 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
(5) |
May
(2) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(2) |
Dec
(3) |
| 2012 |
Jan
(6) |
Feb
(2) |
Mar
(3) |
Apr
(3) |
May
(3) |
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
| 2013 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
| 2015 |
Jan
|
Feb
(19) |
Mar
(115) |
Apr
(23) |
May
(41) |
Jun
(48) |
Jul
(59) |
Aug
(29) |
Sep
(40) |
Oct
(78) |
Nov
(58) |
Dec
(47) |
| 2016 |
Jan
(25) |
Feb
(30) |
Mar
(29) |
Apr
(10) |
May
(17) |
Jun
(1) |
Jul
(1) |
Aug
(6) |
Sep
(2) |
Oct
(1) |
Nov
(3) |
Dec
(2) |
| 2017 |
Jan
(5) |
Feb
(2) |
Mar
(7) |
Apr
(1) |
May
(7) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
(1) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(3) |
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
(29) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(5) |
Dec
(3) |
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
(7) |
Jul
(1) |
Aug
|
Sep
(6) |
Oct
(4) |
Nov
(1) |
Dec
(4) |
| 2024 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(8) |
Jun
(159) |
Jul
(90) |
Aug
(22) |
Sep
|
Oct
(6) |
Nov
(8) |
Dec
(1) |
| 2025 |
Jan
(20) |
Feb
(6) |
Mar
(2) |
Apr
(4) |
May
(29) |
Jun
(63) |
Jul
(62) |
Aug
(70) |
Sep
(120) |
Oct
(46) |
Nov
(33) |
Dec
(25) |
| 2026 |
Jan
(37) |
Feb
(56) |
Mar
(62) |
Apr
(21) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Joe W. <jo...@tr...> - 2003-03-16 17:55:01
|
Steve Freeman wrote: > As an experiment, I've added a 'Release Tasks' tracker to the SF site > and typed all these in (OK, so my life is lacking in excitement these > days...). Doh! We already have one of these here instead - http://jira.truemesh.com/secure/BrowseProject.jspa?id=10001&report=roadmap -joe |
|
From: Steve F. <st...@m3...> - 2003-03-16 12:03:41
|
As an experiment, I've added a 'Release Tasks' tracker to the SF site=20 and typed all these in (OK, so my life is lacking in excitement these=20 days...). S. Joe Walnes wrote: > Okay, codewise we look good to go for 1.0! Thanks to the contributions=20 > of (in no particular order) Owen Rogers, Chris Stevenson, Jim Archer an= d=20 > Steve Freeman. >=20 > There are a few tasks remaining and this is my plea for help: >=20 > Website: > * Upload final nmock.dll to sourceforge. > * Create welcome page content. > * Update download instructions. > * Write quick start tutorial (only something very small for people=20 > already familiar with mocks - we can do a full whitepaper later). > * Update developers/contributors webpage (all of the names above should= =20 > be developers). > * Start a FAQ > * Generate API documentation. >=20 > Announcements: > * Create announcement press release thingy. > * Collate list of relevant places to spam. >=20 > Volunteers welcome :) >=20 > -joe >=20 >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by:Crypto Challenge is now open! Get=20 > cracking and register here for some mind boggling fun and the chance of= =20 > winning an Apple iPod: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en > _______________________________________________ > Nmock-general mailing list > Nmo...@li... > https://lists.sourceforge.net/lists/listinfo/nmock-general --=20 [Advert: Come to http://www.ot2003.org] "What=92s the difference between a C programmer and a LISP programmer? A=20 LISP programmer knows the value of everything but the cost of nothing.A=20 C programmer knows the cost of everything but the value of nothing." (Todd Proebsting) |
|
From: Joe W. <jo...@tr...> - 2003-03-16 10:00:01
|
Okay, codewise we look good to go for 1.0! Thanks to the contributions of (in no particular order) Owen Rogers, Chris Stevenson, Jim Archer and Steve Freeman. There are a few tasks remaining and this is my plea for help: Website: * Upload final nmock.dll to sourceforge. * Create welcome page content. * Update download instructions. * Write quick start tutorial (only something very small for people already familiar with mocks - we can do a full whitepaper later). * Update developers/contributors webpage (all of the names above should be developers). * Start a FAQ * Generate API documentation. Announcements: * Create announcement press release thingy. * Collate list of relevant places to spam. Volunteers welcome :) -joe |
|
From: <exo...@us...> - 2003-03-13 22:22:16
|
Update of /cvsroot/nmock/nmock/test/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv25196/test/NMock
Modified Files:
MockTest.cs
Log Message:
split Method class into Method and SingleMethod and extracted IMethod interface
Index: MockTest.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/test/NMock/MockTest.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** MockTest.cs 13 Mar 2003 20:11:53 -0000 1.6
--- MockTest.cs 13 Mar 2003 22:22:13 -0000 1.7
***************
*** 398,404 ****
catch (VerifyException e)
{
- Assertion.AssertEquals("x() not called enough times", e.Reason);
Assertion.AssertEquals(3, e.Expected);
Assertion.AssertEquals(2, e.Actual);
}
}
--- 398,404 ----
catch (VerifyException e)
{
Assertion.AssertEquals(3, e.Expected);
Assertion.AssertEquals(2, e.Actual);
+ Assertion.AssertEquals("x() not called enough times", e.Reason);
}
}
|
|
From: <exo...@us...> - 2003-03-13 22:22:16
|
Update of /cvsroot/nmock/nmock/src/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv25196/src/NMock
Modified Files:
DynamicMock.cs Method.cs Mock.cs
Added Files:
IMethod.cs SingleMethod.cs
Log Message:
split Method class into Method and SingleMethod and extracted IMethod interface
--- NEW FILE: IMethod.cs ---
using System;
namespace NMock
{
public interface IMethod : IVerifiable
{
string Name { get; }
object Call(params object[] parameters);
void SetExpectation(MockCall call);
}
}
--- NEW FILE: SingleMethod.cs ---
using System;
namespace NMock
{
public class SingleMethod : IMethod
{
private string name;
private MockCall expectation;
private int timesCalled = 0;
public SingleMethod(string name)
{
this.name = name;
}
public string Name
{
get { return name; }
}
public virtual void SetExpectation(MockCall expectation)
{
this.expectation = expectation;
}
public virtual object Call(params object[] parameters)
{
object obj = expectation.Call(name, parameters);
timesCalled++;
return obj;
}
public virtual void Verify()
{
Mock.Assertion.Assert(name + "() never called.", timesCalled > 1);
}
}
}
Index: DynamicMock.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/DynamicMock.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** DynamicMock.cs 13 Mar 2003 21:54:05 -0000 1.7
--- DynamicMock.cs 13 Mar 2003 22:22:11 -0000 1.8
***************
*** 50,54 ****
}
! protected override Method getMethod(string methodName)
{
checkMethodIsValid(methodName);
--- 50,54 ----
}
! protected override IMethod getMethod(string methodName)
{
checkMethodIsValid(methodName);
Index: Method.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/Method.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Method.cs 13 Mar 2003 20:11:51 -0000 1.3
--- Method.cs 13 Mar 2003 22:22:11 -0000 1.4
***************
*** 4,16 ****
namespace NMock
{
! /// <summary>
! /// nb. Shouldn't return value belong to the Call?
! /// </summary>
! public class Method : IVerifiable
{
private static object NO_RETURN_VALUE = new object();
private string name;
- private object returnValue = NO_RETURN_VALUE;
private int timesCalled = 0;
private CallSequence expectations;
--- 4,12 ----
namespace NMock
{
! public class Method : IMethod
{
private static object NO_RETURN_VALUE = new object();
private string name;
private int timesCalled = 0;
private CallSequence expectations;
***************
*** 22,36 ****
}
! public virtual object ReturnValue
{
! set { returnValue = value; }
! get { return returnValue; }
}
- public virtual bool HasReturnValue
- {
- get { return ! Object.ReferenceEquals(NO_RETURN_VALUE, returnValue); }
- }
-
public virtual bool HasNoExpectations
{
--- 18,26 ----
}
! public virtual string Name
{
! get { return name; }
}
public virtual bool HasNoExpectations
{
***************
*** 38,47 ****
}
! public virtual string Name
! {
! get { return name; }
! }
!
! public virtual void AddExpected(MockCall aCall)
{
expectations.Add(aCall);
--- 28,32 ----
}
! public virtual void SetExpectation(MockCall aCall)
{
expectations.Add(aCall);
***************
*** 57,62 ****
public virtual void Verify()
{
- // HACK!
- // TODO: iterate through and verify every call. delegate verification to call instance
Mock.Assertion.AssertEquals(name + "() " + CallCountErrorMessage(),
expectations.CountExpectedCalls, timesCalled);
--- 42,45 ----
Index: Mock.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/Mock.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Mock.cs 13 Mar 2003 21:54:04 -0000 1.7
--- Mock.cs 13 Mar 2003 22:22:11 -0000 1.8
***************
*** 55,76 ****
addExpectation(methodName, new MockCall(null, e, args));
}
public virtual void SetupResult(string methodName, object returnVal)
{
! getMethod(methodName).ReturnValue = returnVal;
}
public virtual object Call(string methodName, params object[] args)
{
! Method method = getMethod(methodName);
! if (method.HasReturnValue)
{
! return method.ReturnValue;
! }
!
! if (method.HasNoExpectations) {
! if ( strict )
{
! throw new VerifyException(method.Name + "() called too many times", 0, 1);
}
return null;
--- 55,89 ----
addExpectation(methodName, new MockCall(null, e, args));
}
+
+ private void addExpectation(string methodName, MockCall call)
+ {
+ IMethod method = getMethod(methodName);
+ if (method == null)
+ {
+ method = new Method(methodName);
+ methods[methodName] = method;
+ }
+ method.SetExpectation(call);
+ }
public virtual void SetupResult(string methodName, object returnVal)
{
! IMethod method = getMethod(methodName);
! if (method == null)
! {
! method = new SingleMethod(methodName);
! methods[methodName] = method;
! }
! method.SetExpectation(new MockCall(returnVal, null, null));
}
public virtual object Call(string methodName, params object[] args)
{
! IMethod method = getMethod(methodName);
! if (method == null)
{
! if (strict)
{
! throw new VerifyException(methodName + "() called too many times", 0, 1);
}
return null;
***************
*** 81,85 ****
public virtual void Verify()
{
! foreach (Method method in methods.Values)
{
method.Verify();
--- 94,98 ----
public virtual void Verify()
{
! foreach (IMethod method in methods.Values)
{
method.Verify();
***************
*** 87,106 ****
}
! private void addExpectation(string methodName, MockCall call)
! {
! getMethod(methodName).AddExpected(call);
! }
!
! protected virtual Method getMethod(string methodName)
{
! Method found = (Method)methods[methodName];
! if (found == null)
! {
! found = new Method(methodName);
! methods[methodName] = found;
! }
! return found;
}
-
public class Assertion
--- 100,107 ----
}
! protected virtual IMethod getMethod(string methodName)
{
! return (IMethod)methods[methodName];
}
public class Assertion
|
|
From: <exo...@us...> - 2003-03-13 22:22:16
|
Update of /cvsroot/nmock/nmock/src
In directory sc8-pr-cvs1:/tmp/cvs-serv25196/src
Modified Files:
src.csproj
Log Message:
split Method class into Method and SingleMethod and extracted IMethod interface
Index: src.csproj
===================================================================
RCS file: /cvsroot/nmock/nmock/src/src.csproj,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** src.csproj 16 Dec 2002 14:51:20 -0000 1.1
--- src.csproj 13 Mar 2003 22:22:12 -0000 1.2
***************
*** 70,74 ****
<Reference
Name = "System.XML"
! AssemblyName = "System.XML"
HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
/>
--- 70,74 ----
<Reference
Name = "System.XML"
! AssemblyName = "System.Xml"
HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
/>
***************
*** 88,91 ****
--- 88,96 ----
/>
<File
+ RelPath = "NMock\IMethod.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "NMock\IMock.cs"
SubType = "Code"
***************
*** 109,112 ****
--- 114,122 ----
<File
RelPath = "NMock\MockCall.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "NMock\SingleMethod.cs"
SubType = "Code"
BuildAction = "Compile"
|
|
From: <sm...@us...> - 2003-03-13 21:55:57
|
Update of /cvsroot/nmock/nmock/test
In directory sc8-pr-cvs1:/tmp/cvs-serv13897/test
Modified Files:
test.csproj
Log Message:
added FastErrorHandlingTest
Index: test.csproj
===================================================================
RCS file: /cvsroot/nmock/nmock/test/test.csproj,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test.csproj 16 Dec 2002 14:52:26 -0000 1.1
--- test.csproj 13 Mar 2003 21:55:53 -0000 1.2
***************
*** 70,74 ****
<Reference
Name = "System.XML"
! AssemblyName = "System.XML"
HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
/>
--- 70,74 ----
<Reference
Name = "System.XML"
! AssemblyName = "System.Xml"
HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
/>
***************
*** 99,102 ****
--- 99,107 ----
<File
RelPath = "NMock\DynamicMockTest.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "NMock\FastErrorHandlingTest.cs"
SubType = "Code"
BuildAction = "Compile"
|
|
From: <sm...@us...> - 2003-03-13 21:55:09
|
Update of /cvsroot/nmock/nmock/test/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv13540/test/NMock
Modified Files:
FastErrorHandlingTest.cs DynamicMockTest.cs
Log Message:
Stopped removing leading 'I' from interface names
Override getMethod() rather than Expect in DynamicMock
Index: FastErrorHandlingTest.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/test/NMock/FastErrorHandlingTest.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FastErrorHandlingTest.cs 27 Feb 2003 22:45:51 -0000 1.1
--- FastErrorHandlingTest.cs 13 Mar 2003 21:54:59 -0000 1.2
***************
*** 42,46 ****
[Test]
! public void SetupResultWithNoMethod()
{
try
--- 42,46 ----
[Test]
! public void ExpectWithMissingMethod()
{
try
***************
*** 56,59 ****
--- 56,66 ----
[Test]
+ [ExpectedException(typeof(MissingMethodException))]
+ public void ExpectAndReturnWithMissingMethod()
+ {
+ full.ExpectAndReturn("xxx", null);
+ }
+
+ [Test]
public void SetupResultWithWrongType()
{
***************
*** 69,79 ****
}
- /// <summary>
- /// this is HUGE, I keep trying to mock non-virtual methods and wasting tons
- /// of time trying to figure
- /// out why my tests are working :)
- /// </summary>
[Test]
! public void MethodNotVirtual()
{
try
--- 76,81 ----
}
[Test]
! public void FailWhenMockedMethodNotVirtual()
{
try
***************
*** 88,99 ****
}
- [Test]
- [ExpectedException(typeof(ArgumentException))]
- [Ignore("Borked... tired want to commit and go home")]
- public void ArgExceptionThrowOnExpectAndReturn()
- {
- full.ExpectAndReturn("xxx", null);
- }
-
}
--- 90,93 ----
Index: DynamicMockTest.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/test/NMock/DynamicMockTest.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** DynamicMockTest.cs 26 Feb 2003 07:47:17 -0000 1.5
--- DynamicMockTest.cs 13 Mar 2003 21:55:03 -0000 1.6
***************
*** 18,22 ****
{
IMock mock = new DynamicMock(typeof(IBlah));
! Assertion.AssertEquals("MockBlah", mock.Name);
mock.ExpectAndReturn("DoStuff", "world", "hello");
--- 18,22 ----
{
IMock mock = new DynamicMock(typeof(IBlah));
! Assertion.AssertEquals("MockIBlah", mock.Name);
mock.ExpectAndReturn("DoStuff", "world", "hello");
***************
*** 109,113 ****
{
IMock mock = new DynamicMock(typeof(IValueType));
! Assertion.AssertEquals("MockValueType", mock.Name);
ArrayList ret = new ArrayList();
DateTime date = DateTime.Now;
--- 109,113 ----
{
IMock mock = new DynamicMock(typeof(IValueType));
! Assertion.AssertEquals("MockIValueType", mock.Name);
ArrayList ret = new ArrayList();
DateTime date = DateTime.Now;
|
|
From: <sm...@us...> - 2003-03-13 21:54:13
|
Update of /cvsroot/nmock/nmock/src/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv13228/src/NMock
Modified Files:
Mock.cs DynamicMock.cs
Log Message:
Stopped removing leading 'I' from interface names
Override getMethod() rather than Expect in DynamicMock
Index: Mock.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/Mock.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Mock.cs 16 Dec 2002 14:49:46 -0000 1.6
--- Mock.cs 13 Mar 2003 21:54:04 -0000 1.7
***************
*** 92,96 ****
}
! private Method getMethod(string methodName)
{
Method found = (Method)methods[methodName];
--- 92,96 ----
}
! protected virtual Method getMethod(string methodName)
{
Method found = (Method)methods[methodName];
Index: DynamicMock.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/DynamicMock.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** DynamicMock.cs 27 Feb 2003 22:45:51 -0000 1.6
--- DynamicMock.cs 13 Mar 2003 21:54:05 -0000 1.7
***************
*** 16,20 ****
{
ignore = new ArrayList();
! Name = "Mock" + StripLeadingIifInterface(type);
}
--- 16,20 ----
{
ignore = new ArrayList();
! Name = "Mock" + type.Name;
}
***************
*** 44,53 ****
}
- private string StripLeadingIifInterface(Type type)
- {
- string name = type.Name;
- return name.StartsWith("I") ? name.Substring(1) : name;
- }
-
private void generate()
{
--- 44,47 ----
***************
*** 56,64 ****
}
! public override void Expect(string methodName, params object[] args)
{
checkMethodIsValid(methodName);
! base.Expect(methodName, args);
}
--- 50,58 ----
}
! protected override Method getMethod(string methodName)
{
checkMethodIsValid(methodName);
! return base.getMethod(methodName);
}
|
|
From: <exo...@us...> - 2003-03-13 20:12:02
|
Update of /cvsroot/nmock/nmock/test/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv32599/test/NMock
Modified Files:
MockTest.cs
Log Message:
fixed MockNoCall bug
Index: MockTest.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/test/NMock/MockTest.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MockTest.cs 13 Mar 2003 19:52:44 -0000 1.5
--- MockTest.cs 13 Mar 2003 20:11:53 -0000 1.6
***************
*** 253,262 ****
}
! [Test, Ignore("NoCall does not currently work, but requires a biggish overhaul to fix. No time right now to do it")]
public void ExpectNoCall_WithNoCall()
{
mock.ExpectNoCall("myMethod");
mock.Verify();
- Assertion.Fail("fa");
}
--- 253,261 ----
}
! [Test] // , Ignore("NoCall does not currently work, but requires a biggish overhaul to fix. No time right now to do it")]
public void ExpectNoCall_WithNoCall()
{
mock.ExpectNoCall("myMethod");
mock.Verify();
}
|
|
From: <exo...@us...> - 2003-03-13 20:11:57
|
Update of /cvsroot/nmock/nmock/src/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv32599/src/NMock
Modified Files:
Method.cs
Log Message:
fixed MockNoCall bug
Index: Method.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/Method.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Method.cs 13 Mar 2003 19:52:44 -0000 1.2
--- Method.cs 13 Mar 2003 20:11:51 -0000 1.3
***************
*** 60,64 ****
// TODO: iterate through and verify every call. delegate verification to call instance
Mock.Assertion.AssertEquals(name + "() " + CallCountErrorMessage(),
! expectations.Count, timesCalled);
}
--- 60,64 ----
// TODO: iterate through and verify every call. delegate verification to call instance
Mock.Assertion.AssertEquals(name + "() " + CallCountErrorMessage(),
! expectations.CountExpectedCalls, timesCalled);
}
***************
*** 95,98 ****
--- 95,115 ----
get { return sequence.Count; }
}
+
+ public int CountExpectedCalls
+ {
+ get
+ {
+ int count = 0;
+ for (int i = 0; i < sequence.Count; i++)
+ {
+ if (! (sequence[i] is MockNoCall))
+ {
+ count++;
+ }
+ }
+ return count;
+ }
+ }
+
public void Add(MockCall aCall)
{
|
|
From: <exo...@us...> - 2003-03-13 19:52:49
|
Update of /cvsroot/nmock/nmock/test/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv23876/test/NMock
Modified Files:
MockTest.cs
Log Message:
modifications to nmock.sln to include sample project
added unit test to indicate NoCall bug
Index: MockTest.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/test/NMock/MockTest.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MockTest.cs 15 Nov 2002 22:31:10 -0000 1.4
--- MockTest.cs 13 Mar 2003 19:52:44 -0000 1.5
***************
*** 253,256 ****
--- 253,264 ----
}
+ [Test, Ignore("NoCall does not currently work, but requires a biggish overhaul to fix. No time right now to do it")]
+ public void ExpectNoCall_WithNoCall()
+ {
+ mock.ExpectNoCall("myMethod");
+ mock.Verify();
+ Assertion.Fail("fa");
+ }
+
[Test]
[ExpectedException(typeof(VerifyException))]
|
|
From: <exo...@us...> - 2003-03-13 19:52:49
|
Update of /cvsroot/nmock/nmock/src/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv23876/src/NMock
Modified Files:
Method.cs
Log Message:
modifications to nmock.sln to include sample project
added unit test to indicate NoCall bug
Index: Method.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/Method.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Method.cs 16 Dec 2002 14:49:59 -0000 1.1
--- Method.cs 13 Mar 2003 19:52:44 -0000 1.2
***************
*** 57,60 ****
--- 57,62 ----
public virtual void Verify()
{
+ // HACK!
+ // TODO: iterate through and verify every call. delegate verification to call instance
Mock.Assertion.AssertEquals(name + "() " + CallCountErrorMessage(),
expectations.Count, timesCalled);
|
|
From: <exo...@us...> - 2003-03-13 19:52:49
|
Update of /cvsroot/nmock/nmock
In directory sc8-pr-cvs1:/tmp/cvs-serv23876
Modified Files:
nmock.sln
Log Message:
modifications to nmock.sln to include sample project
added unit test to indicate NoCall bug
Index: nmock.sln
===================================================================
RCS file: /cvsroot/nmock/nmock/nmock.sln,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** nmock.sln 16 Dec 2002 14:53:35 -0000 1.1
--- nmock.sln 13 Mar 2003 19:52:44 -0000 1.2
***************
*** 4,7 ****
--- 4,9 ----
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test\test.csproj", "{2735C01B-475D-4B75-AF30-C00D9A977E58}"
EndProject
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sample", "sample\sample.csproj", "{F0E405D5-9850-432F-853F-2DC7F1378CCC}"
+ EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
***************
*** 20,23 ****
--- 22,29 ----
{2735C01B-475D-4B75-AF30-C00D9A977E58}.Release.ActiveCfg = Release|.NET
{2735C01B-475D-4B75-AF30-C00D9A977E58}.Release.Build.0 = Release|.NET
+ {F0E405D5-9850-432F-853F-2DC7F1378CCC}.Debug.ActiveCfg = Debug|.NET
+ {F0E405D5-9850-432F-853F-2DC7F1378CCC}.Debug.Build.0 = Debug|.NET
+ {F0E405D5-9850-432F-853F-2DC7F1378CCC}.Release.ActiveCfg = Release|.NET
+ {F0E405D5-9850-432F-853F-2DC7F1378CCC}.Release.Build.0 = Release|.NET
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
From: <joe...@us...> - 2003-02-27 22:45:54
|
Update of /cvsroot/nmock/nmock/test/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv30577/test/NMock
Added Files:
FastErrorHandlingTest.cs
Log Message:
Added support for faster error handling (thanks to Jeremy Stell Smith for the failing test, Jim Arnold for implementing it and to Paul Hammant and Martin Fowler for keeping us company)
--- NEW FILE: FastErrorHandlingTest.cs ---
using NUnit.Framework;
using System;
namespace NMock
{
/// <summary>
/// looking at the code, I think fixing this for one case (SetupResult or Expect)
/// should fix it in all places (at least that's the intent)
///
/// I didn't use ExpectException because I wanted to specify the error message
/// </summary>
[TestFixture]
public class FastErrorHandlingTest : Assertion
{
public class Empty
{
}
public class Full
{
public virtual string Foo()
{
return "foo";
}
public string Bar(string s)
{
return "bar";
}
}
private IMock empty;
private IMock full;
[SetUp]
public void SetUp()
{
empty = new DynamicMock(typeof(Empty));
full = new DynamicMock(typeof(Full));
}
[Test]
public void SetupResultWithNoMethod()
{
try
{
empty.Expect("Foo");
Fail();
}
catch (MissingMethodException e)
{
AssertEquals("method <Foo> not defined", e.Message);
}
}
[Test]
public void SetupResultWithWrongType()
{
try
{
full.SetupResult("Foo", true);
Fail();
}
catch (ArgumentException e)
{
AssertEquals("method <Foo> returns a System.String", e.Message);
}
}
/// <summary>
/// this is HUGE, I keep trying to mock non-virtual methods and wasting tons
/// of time trying to figure
/// out why my tests are working :)
/// </summary>
[Test]
public void MethodNotVirtual()
{
try
{
full.Expect("Bar");
Fail();
}
catch(ArgumentException e)
{
AssertEquals("method <Bar> is not virtual", e.Message);
}
}
[Test]
[ExpectedException(typeof(ArgumentException))]
[Ignore("Borked... tired want to commit and go home")]
public void ArgExceptionThrowOnExpectAndReturn()
{
full.ExpectAndReturn("xxx", null);
}
}
}
|
|
From: <joe...@us...> - 2003-02-27 22:45:54
|
Update of /cvsroot/nmock/nmock/src/NMock/Dynamic
In directory sc8-pr-cvs1:/tmp/cvs-serv30577/src/NMock/Dynamic
Modified Files:
ClassGenerator.cs
Log Message:
Added support for faster error handling (thanks to Jeremy Stell Smith for the failing test, Jim Arnold for implementing it and to Paul Hammant and Martin Fowler for keeping us company)
Index: ClassGenerator.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/Dynamic/ClassGenerator.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ClassGenerator.cs 26 Feb 2003 07:47:17 -0000 1.8
--- ClassGenerator.cs 27 Feb 2003 22:45:51 -0000 1.9
***************
*** 9,13 ****
public class ClassGenerator
{
! private const System.Reflection.BindingFlags ALL_INSTANCE_METHODS
= BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
--- 9,13 ----
public class ClassGenerator
{
! internal const System.Reflection.BindingFlags ALL_INSTANCE_METHODS
= BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
|
|
From: <joe...@us...> - 2003-02-27 22:45:54
|
Update of /cvsroot/nmock/nmock/src/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv30577/src/NMock
Modified Files:
DynamicMock.cs
Log Message:
Added support for faster error handling (thanks to Jeremy Stell Smith for the failing test, Jim Arnold for implementing it and to Paul Hammant and Martin Fowler for keeping us company)
Index: DynamicMock.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/DynamicMock.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** DynamicMock.cs 21 Jan 2003 16:44:08 -0000 1.5
--- DynamicMock.cs 27 Feb 2003 22:45:51 -0000 1.6
***************
*** 1,4 ****
--- 1,5 ----
using System;
using System.Collections;
+ using System.Reflection;
using NMock.Dynamic;
***************
*** 54,57 ****
--- 55,119 ----
obj = cg.Generate(type, this, ignore);
}
+
+ public override void Expect(string methodName, params object[] args)
+ {
+ checkMethodIsValid(methodName);
+
+ base.Expect(methodName, args);
+ }
+
+ public override void SetupResult(string methodName, object returnVal)
+ {
+ checkMethodIsValid(methodName);
+ checkReturnTypeIsValid(methodName, returnVal);
+ base.SetupResult(methodName, returnVal);
+ }
+
+ void checkReturnTypeIsValid(string methodName, object returnVal)
+ {
+ if (returnVal == null)
+ {
+ return;
+ }
+
+ MethodInfo method = type.GetMethod(methodName, ClassGenerator.ALL_INSTANCE_METHODS);
+ Type realReturnVal;
+ if(method == null)
+ {
+ realReturnVal = type.GetProperty(methodName, ClassGenerator.ALL_INSTANCE_METHODS).PropertyType;
+ }
+ else
+ {
+ realReturnVal = method.ReturnType;
+ }
+
+ if (realReturnVal == null)
+ {
+ realReturnVal = type.GetProperty(methodName, ClassGenerator.ALL_INSTANCE_METHODS).PropertyType;
+ }
+
+ if(realReturnVal != returnVal.GetType())
+ {
+ throw new ArgumentException(String.Format("method <{0}> returns a {1}", methodName, realReturnVal));
+ }
+ }
+
+ void checkMethodIsValid(string methodName)
+ {
+ MethodInfo method = type.GetMethod(methodName, ClassGenerator.ALL_INSTANCE_METHODS);
+ PropertyInfo property = type.GetProperty(methodName, ClassGenerator.ALL_INSTANCE_METHODS);
+
+ if (method == null && property == null)
+ {
+ throw new MissingMethodException(String.Format("method <{0}> not defined", methodName));
+ }
+
+
+ if(method != null)
+ {
+ if(!method.IsVirtual) throw new ArgumentException(String.Format("method <{0}> is not virtual", methodName));
+ }
+ }
+
}
}
|
|
From: Joe W. <jo...@tr...> - 2003-02-27 07:54:00
|
Good idea. I'll work these in over the weekend. And I still think this is the most awesome way to submit bugfix/feature requests. -joe Jeremy Stell-Smith wrote: >this is more just things I find really annoying. >Mostly that NMock should fail early and tell you why >it won't do what you're trying to make it do... > >__________________________________________________ >Do you Yahoo!? >Yahoo! Tax Center - forms, calculators, tips, more >http://taxes.yahoo.com/ > >------------------------------------------------------------------------ > >using System; > >using NUnit.Framework; >using NMock; > >namespace Pilot.Fit.Test >{ > /// <summary> > /// looking at the code, I think fixing this for one case (SetupResult or Expect) > /// should fix it in all places (at least that's the intent) > /// > /// I didn't use ExpectException because I wanted to specify the error message > /// </summary> > [TestFixture] > public class FastErrorHandlingTest : Assertion > { > public class Empty > { > } > > public class Full > { > public string Foo() > { > return "foo"; > } > > public virtual string Bar(string s) > { > return "bar"; > } > } > > private IMock empty; > private IMock full; > > [SetUp] > public void SetUp() > { > empty = new DynamicMock(typeof(Empty)); > full = new DynamicMock(typeof(Full)); > } > > [Test] > public void SetupResultWithNoMethod() > { > try > { > empty.Expect("Foo"); > Fail(); > } > catch (MissingMethodException e) > { > AssertEquals("method <Foo> not defined", e.Message); > } > } > > [Test] > public void SetupResultWithWrongType() > { > try > { > full.SetupResult("Foo", true); > Fail(); > } > catch (ArgumentException e) > { > AssertEquals("method <Foo> returns a System.String", e.Message); > } > } > > /// <summary> > /// this is HUGE, I keep trying to mock non-virtual methods and wasting tons of time trying to figure > /// out why my tests are working :) > /// </summary> > [Test] > public void MethodNotVirtual() > { > try > { > full.Expect("Bar"); > Fail(); > } > catch(ArgumentException e) > { > AssertEquals("method <bar> not virtual", e.Message); > } > } > } >} > > |
|
From: Jeremy Stell-S. <ste...@ya...> - 2003-02-27 02:05:01
|
this is more just things I find really annoying. Mostly that NMock should fail early and tell you why it won't do what you're trying to make it do... __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ |
|
From: <joe...@us...> - 2003-02-26 07:47:20
|
Update of /cvsroot/nmock/nmock/src/NMock/Dynamic
In directory sc8-pr-cvs1:/tmp/cvs-serv15626/src/NMock/Dynamic
Modified Files:
ClassGenerator.cs
Log Message:
Fixed bug that causes the whole runtime to crash when trying to mock value types.
Bug fix by Luke Maxon @ ThoughtWorks
Index: ClassGenerator.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/Dynamic/ClassGenerator.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ClassGenerator.cs 14 Feb 2003 20:51:00 -0000 1.7
--- ClassGenerator.cs 26 Feb 2003 07:47:17 -0000 1.8
***************
*** 139,143 ****
il.Emit(OpCodes.Ldc_I4_S, i);
il.Emit(OpCodes.Ldarg_S, i + 1);
! if (paramTypes[i].IsPrimitive)
{
il.Emit(OpCodes.Box, paramTypes[i]);
--- 139,143 ----
il.Emit(OpCodes.Ldc_I4_S, i);
il.Emit(OpCodes.Ldarg_S, i + 1);
! if (paramTypes[i].IsPrimitive || paramTypes[i].IsValueType)
{
il.Emit(OpCodes.Box, paramTypes[i]);
|
|
From: <joe...@us...> - 2003-02-26 07:47:20
|
Update of /cvsroot/nmock/nmock/test/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv15626/test/NMock
Modified Files:
DynamicMockTest.cs
Log Message:
Fixed bug that causes the whole runtime to crash when trying to mock value types.
Bug fix by Luke Maxon @ ThoughtWorks
Index: DynamicMockTest.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/test/NMock/DynamicMockTest.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** DynamicMockTest.cs 12 Dec 2002 21:39:44 -0000 1.4
--- DynamicMockTest.cs 26 Feb 2003 07:47:17 -0000 1.5
***************
*** 1,4 ****
--- 1,5 ----
using NUnit.Framework;
using System;
+ using System.Collections;
namespace NMock
***************
*** 102,105 ****
--- 103,126 ----
m2.Call("y", "something else");
m2.Verify();
+ }
+
+ [Test]
+ public void ValueType()
+ {
+ IMock mock = new DynamicMock(typeof(IValueType));
+ Assertion.AssertEquals("MockValueType", mock.Name);
+ ArrayList ret = new ArrayList();
+ DateTime date = DateTime.Now;
+ mock.ExpectAndReturn("Query", ret, "hello", date);
+
+ IValueType blah = (IValueType)mock.MockInstance;
+ Assertion.AssertEquals(ret, blah.Query("hello", date));
+
+ mock.Verify();
+ }
+
+ interface IValueType
+ {
+ ArrayList Query(string symbol, DateTime arg2);
}
|
|
From: <sm...@us...> - 2003-02-19 12:20:46
|
Update of /cvsroot/nmock/nmock/test In directory sc8-pr-cvs1:/tmp/cvs-serv32524/test Removed Files: test.csproj.user Log Message: deleted non-repository file --- test.csproj.user DELETED --- |
|
From: <sm...@us...> - 2003-02-19 12:20:46
|
Update of /cvsroot/nmock/nmock/src In directory sc8-pr-cvs1:/tmp/cvs-serv32524/src Removed Files: src.csproj.user Log Message: deleted non-repository file --- src.csproj.user DELETED --- |
|
From: Joe W. <jo...@tr...> - 2003-02-14 22:09:48
|
Jeremy Stell-Smith wrote: >write a test for a project that exposes the bug, and >have someone fix it w/in a couple hours...way cool :) > > What was really cool was how I had no idea what I was doing..... I used your test, thought about it for a bit, and thought 'what if I do this....' and it just passed first time! :) Why don't all oss projects work like this? -joe |
|
From: Jeremy Stell-S. <ste...@ya...> - 2003-02-14 21:26:52
|
write a test for a project that exposes the bug, and have someone fix it w/in a couple hours...way cool :) __________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com |