|
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);
}
|