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
(24) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <exo...@us...> - 2003-07-13 13:27:10
|
Update of /cvsroot/nmock/nmock/test
In directory sc8-pr-cvs1:/tmp/cvs-serv24746/test
Modified Files:
test.csproj
Log Message:
added support for remotable mocks
Index: test.csproj
===================================================================
RCS file: /cvsroot/nmock/nmock/test/test.csproj,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test.csproj 13 Jul 2003 11:12:17 -0000 1.3
--- test.csproj 13 Jul 2003 13:27:06 -0000 1.4
***************
*** 17,21 ****
DelaySign = "false"
OutputType = "Library"
! RootNamespace = "NMock"
StartupObject = ""
>
--- 17,21 ----
DelaySign = "false"
OutputType = "Library"
! RootNamespace = ""
StartupObject = ""
>
***************
*** 36,40 ****
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
! WarningLevel = "4"
/>
<Config
--- 36,40 ----
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
! WarningLevel = "3"
/>
<Config
***************
*** 88,91 ****
--- 88,96 ----
HintPath = "..\lib\nunit.framework.dll"
/>
+ <Reference
+ Name = "System.Runtime.Remoting"
+ AssemblyName = "System.Runtime.Remoting"
+ HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Runtime.Remoting.dll"
+ />
</References>
</Build>
***************
*** 134,137 ****
--- 139,152 ----
<File
RelPath = "NMock\Dynamic\InterfaceListerTest.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "NMock\Remoting\MockServerTest.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "NMock\Remoting\RemotingMockTest.cs"
SubType = "Code"
BuildAction = "Compile"
|
|
From: <exo...@us...> - 2003-07-13 13:27:10
|
Update of /cvsroot/nmock/nmock/src/NMock/Remoting
In directory sc8-pr-cvs1:/tmp/cvs-serv24746/src/NMock/Remoting
Added Files:
MockServer.cs RemotingClassGenerator.cs RemotingMock.cs
Log Message:
added support for remotable mocks
--- NEW FILE: MockServer.cs ---
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
namespace NMock.Remoting
{
public class MockServer : IDisposable
{
private MarshalByRefObject mock;
private IChannel channel;
private ObjRef mockRef;
public MockServer(MarshalByRefObject mock, IChannel channel, string uri)
{
this.mock = mock;
this.channel = channel;
ChannelServices.RegisterChannel(channel);
mockRef = RemotingServices.Marshal(mock, uri);
}
public void Dispose()
{
try
{
if (mockRef != null)
{
RemotingServices.Disconnect(mock);
}
}
catch (Exception) { throw; }
finally { ChannelServices.UnregisterChannel(channel); }
}
}
}
--- NEW FILE: RemotingClassGenerator.cs ---
using System;
using NMock.Dynamic;
namespace NMock.Remoting
{
public class RemotingClassGenerator : ClassGenerator
{
protected override Type getSuperClass(Type originalType)
{
return (originalType.IsInterface) ? typeof(MarshalByRefObject) : originalType;
}
}
}
--- NEW FILE: RemotingMock.cs ---
using System;
using NMock.Dynamic;
namespace NMock.Remoting
{
public class RemotingMock : DynamicMock
{
public RemotingMock(Type type) : base(type)
{
}
public MarshalByRefObject MarshalByRefInstance
{
get
{
return (MarshalByRefObject)MockInstance;
}
}
protected override ClassGenerator createClassGenerator()
{
return new RemotingClassGenerator();
}
}
}
|
|
From: <exo...@us...> - 2003-07-13 13:27:10
|
Update of /cvsroot/nmock/nmock/test/NMock/Remoting
In directory sc8-pr-cvs1:/tmp/cvs-serv24746/test/NMock/Remoting
Added Files:
MockServerTest.cs RemotingMockTest.cs
Log Message:
added support for remotable mocks
--- NEW FILE: MockServerTest.cs ---
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels.Tcp;
using NUnit.Framework;
namespace NMock.Remoting
{
[TestFixture]
public class MockServerTest
{
[Test]
public void MarshalRemotingMock()
{
RemotingMock mock = new RemotingMock(typeof(Foo));
mock.Expect("Bar");
TcpChannel channel = new TcpChannel(1234);
using (MockServer server = new MockServer(mock.MarshalByRefInstance, channel, "mock.rem"))
{
Foo foo = (Foo)RemotingServices.Connect(typeof(Foo), "tcp://localhost:1234/mock.rem");
foo.Bar();
}
mock.Verify();
}
interface Foo
{
void Bar();
}
}
}
--- NEW FILE: RemotingMockTest.cs ---
using System;
using NUnit.Framework;
using NMock.Remoting;
namespace NMock.Remoting
{
[TestFixture]
public class RemotingMockTest : Assertion
{
[Test]
public void GenerateMockFromInterface()
{
RemotingMock mock = new RemotingMock(typeof(Base));
MarshalByRefObject instance = mock.MarshalByRefInstance;
AssertNotNull(instance);
}
interface Base
{
void Foo();
}
}
}
|
|
From: <exo...@us...> - 2003-07-13 13:27:10
|
Update of /cvsroot/nmock/nmock/src
In directory sc8-pr-cvs1:/tmp/cvs-serv24746/src
Modified Files:
src.csproj
Log Message:
added support for remotable mocks
Index: src.csproj
===================================================================
RCS file: /cvsroot/nmock/nmock/src/src.csproj,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** src.csproj 13 Jul 2003 11:12:17 -0000 1.3
--- src.csproj 13 Jul 2003 13:27:06 -0000 1.4
***************
*** 17,21 ****
DelaySign = "false"
OutputType = "Library"
! RootNamespace = "NMock"
StartupObject = ""
>
--- 17,21 ----
DelaySign = "false"
OutputType = "Library"
! RootNamespace = ""
StartupObject = ""
>
***************
*** 149,152 ****
--- 149,167 ----
<File
RelPath = "NMock\Dynamic\InterfaceLister.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "NMock\Remoting\MockServer.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "NMock\Remoting\RemotingClassGenerator.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "NMock\Remoting\RemotingMock.cs"
SubType = "Code"
BuildAction = "Compile"
|
|
From: <exo...@us...> - 2003-07-13 13:27:10
|
Update of /cvsroot/nmock/nmock/src/NMock/Dynamic
In directory sc8-pr-cvs1:/tmp/cvs-serv24746/src/NMock/Dynamic
Modified Files:
ClassGenerator.cs
Log Message:
added support for remotable mocks
Index: ClassGenerator.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/Dynamic/ClassGenerator.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** ClassGenerator.cs 27 Jun 2003 21:17:10 -0000 1.11
--- ClassGenerator.cs 13 Jul 2003 13:27:06 -0000 1.12
***************
*** 53,69 ****
AssemblyBuilder assemblyBuilder = appDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run);
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("MockModule");
! Type superClass;
! Type[] interfaces;
! if (originalType.IsInterface)
! {
! superClass = null;
! interfaces = new Type[] {originalType};
! }
! else
! {
! superClass = originalType;
! interfaces = new Type[0];
! }
! return moduleBuilder.DefineType(name, TypeAttributes.Public, superClass, interfaces);
}
--- 53,67 ----
AssemblyBuilder assemblyBuilder = appDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run);
ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("MockModule");
! return moduleBuilder.DefineType(name, TypeAttributes.Public, getSuperClass(originalType), getInterfaces(originalType));
! }
!
! protected virtual Type getSuperClass(Type originalType)
! {
! return (originalType.IsInterface) ? null : originalType;
! }
!
! protected virtual Type[] getInterfaces(Type originalType)
! {
! return (originalType.IsInterface) ? new Type[] { originalType } : new Type[0];
}
|
|
From: <exo...@us...> - 2003-07-13 13:27:09
|
Update of /cvsroot/nmock/nmock/src/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv24746/src/NMock
Modified Files:
DynamicMock.cs
Log Message:
added support for remotable mocks
Index: DynamicMock.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/DynamicMock.cs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** DynamicMock.cs 1 Jun 2003 09:48:48 -0000 1.9
--- DynamicMock.cs 13 Jul 2003 13:27:06 -0000 1.10
***************
*** 30,34 ****
if (obj == null)
{
! generate();
}
return obj;
--- 30,34 ----
if (obj == null)
{
! obj = generate();
}
return obj;
***************
*** 44,53 ****
}
! private void generate()
{
! ClassGenerator cg = new ClassGenerator();
! obj = cg.Generate(type, this, ignore);
}
protected override IMethod getMethod(string methodName)
{
--- 44,58 ----
}
! protected virtual object generate()
{
! ClassGenerator cg = createClassGenerator();
! return cg.Generate(type, this, ignore);
}
+ protected virtual ClassGenerator createClassGenerator()
+ {
+ return new ClassGenerator();
+ }
+
protected override IMethod getMethod(string methodName)
{
|
|
From: <exo...@us...> - 2003-07-13 13:25:15
|
Update of /cvsroot/nmock/nmock/test/NMock/Remoting In directory sc8-pr-cvs1:/tmp/cvs-serv24294/Remoting Log Message: Directory /cvsroot/nmock/nmock/test/NMock/Remoting added to the repository |
|
From: <exo...@us...> - 2003-07-13 13:24:47
|
Update of /cvsroot/nmock/nmock/src/NMock/Remoting In directory sc8-pr-cvs1:/tmp/cvs-serv24092/Remoting Log Message: Directory /cvsroot/nmock/nmock/src/NMock/Remoting added to the repository |
|
From: <exo...@us...> - 2003-07-13 11:12:21
|
Update of /cvsroot/nmock/nmock/test
In directory sc8-pr-cvs1:/tmp/cvs-serv9816/test
Modified Files:
test.csproj
Log Message:
included missing files in vs project
Index: test.csproj
===================================================================
RCS file: /cvsroot/nmock/nmock/test/test.csproj,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test.csproj 13 Mar 2003 21:55:53 -0000 1.2
--- test.csproj 13 Jul 2003 11:12:17 -0000 1.3
***************
*** 123,127 ****
--- 123,137 ----
/>
<File
+ RelPath = "NMock\Constraints\IsArrayEqualTest.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "NMock\Dynamic\ClassGeneratorTest.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "NMock\Dynamic\InterfaceListerTest.cs"
SubType = "Code"
BuildAction = "Compile"
|
|
From: <exo...@us...> - 2003-07-13 11:12:21
|
Update of /cvsroot/nmock/nmock/src
In directory sc8-pr-cvs1:/tmp/cvs-serv9816/src
Modified Files:
src.csproj
Log Message:
included missing files in vs project
Index: src.csproj
===================================================================
RCS file: /cvsroot/nmock/nmock/src/src.csproj,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** src.csproj 13 Mar 2003 22:22:12 -0000 1.2
--- src.csproj 13 Jul 2003 11:12:17 -0000 1.3
***************
*** 138,142 ****
--- 138,152 ----
/>
<File
+ RelPath = "NMock\Constraints\IsArrayEqual.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "NMock\Dynamic\ClassGenerator.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "NMock\Dynamic\InterfaceLister.cs"
SubType = "Code"
BuildAction = "Compile"
|
|
From: <joe...@us...> - 2003-07-11 08:33:12
|
Update of /cvsroot/nmock/nmock/src/NMock/Constraints
In directory sc8-pr-cvs1:/tmp/cvs-serv10925/src/NMock/Constraints
Added Files:
IsArrayEqual.cs
Log Message:
Added IsArrayEqual constraint - by Luke Maxon
--- NEW FILE: IsArrayEqual.cs ---
// Contributed by Luke Maxon <lt...@th...>
using System;
using System.Collections;
namespace NMock.Constraints
{
public class IsListEqual : BaseConstraint
{
private object compare;
public IsListEqual(object compare)
{
this.compare = compare;
}
public override bool Eval(object val)
{
IList thisList = compare as IList;
IList thatList = val as IList;
if(thisList == null || thatList == null)
{
return false;
}
if(thisList.Count != thatList.Count)
{
return false;
}
for(int i=0;i<thisList.Count;++i)
{
if(!thisList[i].Equals(thatList[i]))
{
return false;
}
}
return true;
}
public override string Message
{
get { return "<" + compare + ">"; }
}
}
}
|
|
From: <joe...@us...> - 2003-07-11 08:33:10
|
Update of /cvsroot/nmock/nmock/test/NMock/Constraints
In directory sc8-pr-cvs1:/tmp/cvs-serv10925/test/NMock/Constraints
Added Files:
IsArrayEqualTest.cs
Log Message:
Added IsArrayEqual constraint - by Luke Maxon
--- NEW FILE: IsArrayEqualTest.cs ---
// Contributed by Luke Maxon <lt...@th...>
using System;
using System.Collections;
using NUnit.Framework;
namespace NMock.Constraints
{
[TestFixture]
public class IsArrayEqualTest
{
[Test]
public void NotObjectArrays()
{
object o1 = new object();
object[] o2 = new object[] {};
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(!c.Eval(o2));
Assertion.Assert(!c.Eval(o1));
Assertion.Assert(!c.Eval(null));
}
[Test]
public void EmptyArrayEqual()
{
object[] o1 = new object[] {};
object[] o2 = new object[] {};
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(c.Eval(o2));
Assertion.Assert(c.Eval(o1));
Assertion.Assert(!c.Eval(null));
}
[Test]
public void DifferentSizeEqual()
{
object[] o1 = new object[1] {"foo"};
object[] o2 = new object[2] {"foo", "bar"};
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(!c.Eval(o2));
}
[Test]
public void EqualSingleElement()
{
object[] o1 = new object[1] {"foo"};
object[] o2 = new object[1] {"foo"};
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(c.Eval(o2));
}
[Test]
public void NotEqualSingleElement()
{
object[] o1 = new object[1] {"foo"};
object[] o2 = new object[1] {"bar"};
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(!c.Eval(o2));
}
[Test]
public void EqualMultipleElements()
{
object[] o1 = new object[2] {"foo", "bar"};
object[] o2 = new object[2] {"foo", "bar"};
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(c.Eval(o2));
}
[Test]
public void NotEqualMultipleElements()
{
object[] o1 = new object[2] {"foo", "bar"};
object[] o2 = new object[2] {"foo", "baz"};
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(!c.Eval(o2));
}
}
[TestFixture]
public class IsListEqualTest
{
[Test]
public void NotIList()
{
object o1 = new object();
IList o2 = new ArrayList();
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(!c.Eval(o2));
Assertion.Assert(!c.Eval(o1));
Assertion.Assert(!c.Eval(null));
}
[Test]
public void EmptyIListEqual()
{
IList o1 = new ArrayList();
IList o2 = new ArrayList();
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(c.Eval(o2));
Assertion.Assert(c.Eval(o1));
Assertion.Assert(!c.Eval(null));
}
[Test]
public void DifferentSizeEqual()
{
IList o1 = new ArrayList(new object[] {"foo"});
IList o2 = new ArrayList(new object[2] {"foo", "bar"});
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(!c.Eval(o2));
}
[Test]
public void EqualSingleElement()
{
IList o1 = new ArrayList(new object[1] {"foo"});
IList o2 = new ArrayList(new object[1] {"foo"});
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(c.Eval(o2));
}
[Test]
public void NotEqualSingleElement()
{
IList o1 = new ArrayList(new object[1] {"foo"});
IList o2 = new ArrayList(new object[1] {"bar"});
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(!c.Eval(o2));
}
[Test]
public void EqualMultipleElements()
{
IList o1 = new ArrayList(new object[2] {"foo", "bar"});
IList o2 = new ArrayList(new object[2] {"foo", "bar"});
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(c.Eval(o2));
}
[Test]
public void NotEqualMultipleElements()
{
IList o1 = new ArrayList(new object[2] {"foo", "bar"});
IList o2 = new ArrayList(new object[2] {"foo", "baz"});
IsListEqual c = new IsListEqual(o1);
Assertion.Assert(!c.Eval(o2));
}
}
}
|
|
From: <nic...@us...> - 2003-06-27 21:34:11
|
Update of /cvsroot/nmock/nmock/src/NMock/Dynamic
In directory sc8-pr-cvs1:/tmp/cvs-serv27171/src/NMock/Dynamic
Modified Files:
ClassGenerator.cs
Log Message:
Corrected msil to handle 64 bit arguments
Index: ClassGenerator.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/Dynamic/ClassGenerator.cs,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** ClassGenerator.cs 1 Jun 2003 09:48:49 -0000 1.10
--- ClassGenerator.cs 27 Jun 2003 21:17:10 -0000 1.11
***************
*** 125,133 ****
private void EmitMethodSignature(MethodInfo methodInfo, Type[] paramTypes, ILGenerator il)
{
! foreach (Type paramType in paramTypes)
! {
! il.DeclareLocal(paramType);
! }
!
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Ldfld, mockFieldBuilder);
--- 125,129 ----
private void EmitMethodSignature(MethodInfo methodInfo, Type[] paramTypes, ILGenerator il)
{
! il.DeclareLocal( typeof(object) );
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Ldfld, mockFieldBuilder);
***************
*** 175,183 ****
}
il.DeclareLocal(returnType);
! il.Emit(OpCodes.Stloc_0);
Label l = il.DefineLabel();
il.Emit(OpCodes.Br_S, l);
il.MarkLabel(l);
! il.Emit(OpCodes.Ldloc_0);
}
il.Emit(OpCodes.Ret);
--- 171,179 ----
}
il.DeclareLocal(returnType);
! il.Emit(OpCodes.Stloc_1);
Label l = il.DefineLabel();
il.Emit(OpCodes.Br_S, l);
il.MarkLabel(l);
! il.Emit(OpCodes.Ldloc_1);
}
il.Emit(OpCodes.Ret);
|
|
From: <nic...@us...> - 2003-06-27 21:31:50
|
Update of /cvsroot/nmock/nmock/test/NMock/Dynamic
In directory sc8-pr-cvs1:/tmp/cvs-serv27031/test/NMock/Dynamic
Modified Files:
ClassGeneratorTest.cs
Log Message:
New test for when the first argument of a method is a 64 bit value type.
Index: ClassGeneratorTest.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/test/NMock/Dynamic/ClassGeneratorTest.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ClassGeneratorTest.cs 14 Feb 2003 20:56:32 -0000 1.6
--- ClassGeneratorTest.cs 27 Jun 2003 21:15:54 -0000 1.7
***************
*** 18,21 ****
--- 18,22 ----
void WithOtherArgs(int x, bool y, object o, IList list);
void WithParams(int i, params string[] extra);
+ void WithLongParam(long l);
object simpleReturn();
string stringReturn();
***************
*** 211,214 ****
--- 212,223 ----
mock.Expect("WithOtherArgs", new IsEqual(6), new IsEqual(true), new IsNull(), new IsEqual(l));
thingy.WithOtherArgs(6, true, null, l);
+ mock.Verify();
+ }
+
+ [Test]
+ public void CallMethodWithLongParam()
+ {
+ mock.Expect("WithLongParam", 5L);
+ thingy.WithLongParam(5L);
mock.Verify();
}
|
|
From: <sm...@us...> - 2003-06-14 23:30:22
|
Update of /cvsroot/nmock/nmock/test In directory sc8-pr-cvs1:/tmp/cvs-serv13409/test Added Files: .cvsignore Log Message: Added cvs ignore for VisualStudio builds --- NEW FILE: .cvsignore --- bin obj |
|
From: <sm...@us...> - 2003-06-14 23:29:51
|
Update of /cvsroot/nmock/nmock/src In directory sc8-pr-cvs1:/tmp/cvs-serv13289/src Added Files: .cvsignore Log Message: Added cvs ignore for VisualStudio builds --- NEW FILE: .cvsignore --- bin obj |
|
From: <OR...@th...> - 2003-06-02 12:57:40
|
the Assertion class has relatively few Assert methods, so another thing that is great to do is to create a subclass of Assertion that you can put your custom assert methods into. right now within the CC.NET project, for example, there is a CustomAssertion class that has methods like AssertNotEquals, AssertFalse, AssertContains, etc. cheers, o. --- R. Owen Rogers ThoughtWorks Ltd Peek House 20, Eastcheap London EC3M 1EB tel: +44 (0) 207 090 7400 mobile: +44 (0) 787 673 8898 |---------+-----------------------------------------> | | Jeremy Stell-Smith | | | <ste...@ya...> | | | Sent by: | | | nmo...@li...| | | ceforge.net | | | | | | | | | 06/01/2003 04:28 PM | |---------+-----------------------------------------> >------------------------------------------------------------------------------------------------------------------------------| | | | To: nmock <nmo...@li...> | | cc: | | Subject: Re: [Nmock-general] mocking members from base interfaces | >------------------------------------------------------------------------------------------------------------------------------| Thanks, Joe, I'll try this out Yeah, I do this all the time. I was complaining to Two about how there's no default TestCase that already extends Assertion as there is in JUnit, and he pointed out there's another pattern which is nice to use sometimes. Which is the testcase extends the class under test. So I'm happy extending assertion when possible. Another idea that I'd be interested in hearing about someone actually using is putting your test methods in your production class. More and more I question making everything separate. Plus it seems the simplest thing that could possibly work. That said I'm not doing it - yet. I think I still like to have classes that are very small and elegant, test code would obfuscate them a little (of course we could always hide it in a test region :) hehe) Jeremy --- Joe Walnes <jo...@tr...> wrote: > Thanks Jeremy - I'll look into this. > > I noticed that your testcase extends Assertion - I > presume this is so > it's easier to use use AssertBlah methods. Is this a > pattern you use > frequently? Does anyone else do this? > > -joe __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com ------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Nmock-general mailing list Nmo...@li... https://lists.sourceforge.net/lists/listinfo/nmock-general |
|
From: Jim A. <jim...@ho...> - 2003-06-02 09:03:53
|
I generally extend Assertion too. On putting test methods inside the class under test - a nested class makes this slightly cleaner. Nested classes have full access to private members of the containing class, so you can have internal tests without bloating your public interface. In C# v2, Partial Types will be really useful for testing. You can have test methods in a separate file which only gets compiled-in for test builds. Jim >From: Jeremy Stell-Smith <ste...@ya...> >To: nmock <nmo...@li...> >Subject: Re: [Nmock-general] mocking members from base interfaces >Date: Sun, 1 Jun 2003 08:28:47 -0700 (PDT) > >Thanks, Joe, I'll try this out > >Yeah, I do this all the time. I was complaining to >Two about how there's no default TestCase that already >extends Assertion as there is in JUnit, and he pointed >out there's another pattern which is nice to use >sometimes. Which is the testcase extends the class >under test. So I'm happy extending assertion when >possible. > >Another idea that I'd be interested in hearing about >someone actually using is putting your test methods in >your production class. More and more I question >making everything separate. Plus it seems the >simplest thing that could possibly work. That said >I'm not doing it - yet. I think I still like to have >classes that are very small and elegant, test code >would obfuscate them a little (of course we could >always hide it in a test region :) hehe) > >Jeremy > >--- Joe Walnes <jo...@tr...> wrote: > > Thanks Jeremy - I'll look into this. > > > > I noticed that your testcase extends Assertion - I > > presume this is so > > it's easier to use use AssertBlah methods. Is this a > > pattern you use > > frequently? Does anyone else do this? > > > > -joe > > >__________________________________ >Do you Yahoo!? >The New Yahoo! Search - Faster. Easier. Bingo. >http://search.yahoo.com > > >------------------------------------------------------- >This SF.net email is sponsored by: eBay >Get office equipment for less on eBay! >http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 >_______________________________________________ >Nmock-general mailing list >Nmo...@li... >https://lists.sourceforge.net/lists/listinfo/nmock-general _________________________________________________________________ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger |
|
From: Jeremy Stell-S. <ste...@ya...> - 2003-06-01 15:28:52
|
Thanks, Joe, I'll try this out Yeah, I do this all the time. I was complaining to Two about how there's no default TestCase that already extends Assertion as there is in JUnit, and he pointed out there's another pattern which is nice to use sometimes. Which is the testcase extends the class under test. So I'm happy extending assertion when possible. Another idea that I'd be interested in hearing about someone actually using is putting your test methods in your production class. More and more I question making everything separate. Plus it seems the simplest thing that could possibly work. That said I'm not doing it - yet. I think I still like to have classes that are very small and elegant, test code would obfuscate them a little (of course we could always hide it in a test region :) hehe) Jeremy --- Joe Walnes <jo...@tr...> wrote: > Thanks Jeremy - I'll look into this. > > I noticed that your testcase extends Assertion - I > presume this is so > it's easier to use use AssertBlah methods. Is this a > pattern you use > frequently? Does anyone else do this? > > -joe __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com |
|
From: Joe W. <jo...@tr...> - 2003-06-01 09:52:52
|
Fixed.
Improved how interface/class heirachies are handled - should be pretty
robust now.
-joe
Jeremy Stell-Smith wrote:
>hey guys, got another bug report/feature request.
>
>basically nmock croaks when trying to mock an
>interface that subclasses another one
>
>Jeremy
>
>PS sorry about the foo's joe :)
>
>using NMock;
>using NUnit.Framework;
>
>[TestFixture]
>public class NMockTest : Assertion
>{
> public interface ISuperFoo
> {
> string GetSuperString();
> }
>
> public interface IFoo : ISuperFoo
> {
> }
>
> [Test]
> public void MockingMembersFromBaseInterfaces()
> {
> IMock mock = new DynamicMock(typeof(IFoo));
> mock.ExpectAndReturn("GetSuperString", "some
>string");
>
> IFoo foo = (IFoo) mock.MockInstance;
>
> AssertEquals("some string",
>foo.GetSuperString());
> }
>}
>
>
>__________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo.
>http://search.yahoo.com
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: eBay
>Get office equipment for less on eBay!
>http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
>_______________________________________________
>Nmock-general mailing list
>Nmo...@li...
>https://lists.sourceforge.net/lists/listinfo/nmock-general
>
>
|
|
From: <joe...@us...> - 2003-06-01 09:48:53
|
Update of /cvsroot/nmock/nmock/test/NMock/Dynamic
In directory sc8-pr-cvs1:/tmp/cvs-serv31005/test/NMock/Dynamic
Added Files:
InterfaceListerTest.cs
Log Message:
Added better support for mocking interface hierarchies (Jeremy Stell-Smith pointed out the brokenness of it all).
--- NEW FILE: InterfaceListerTest.cs ---
using NUnit.Framework;
using System;
using System.Text;
namespace NMock.Dynamic
{
[TestFixture]
public class InterfaceListerTest
{
InterfaceLister i = new InterfaceLister();
Type[] result;
interface StandAloneI {}
[Test]
public void StandAloneInterface()
{
result = i.List(typeof(StandAloneI));
AssertResult(typeof(StandAloneI));
}
class StandAloneC {}
[Test]
public void StandAloneClass()
{
result = i.List(typeof(StandAloneC));
AssertResult(typeof(StandAloneC));
}
interface ExtendsI : StandAloneI {}
[Test]
public void InterfaceExtendsInterface()
{
result = i.List(typeof(ExtendsI));
AssertResult(typeof(ExtendsI), typeof(StandAloneI));
}
class ExtendsC : StandAloneI {}
[Test]
public void ClassExtendsInterface()
{
result = i.List(typeof(ExtendsC));
AssertResult(typeof(ExtendsC), typeof(StandAloneI));
}
interface I1 {}
interface I2 {}
interface I3 {}
interface ExtendsMultipleI : I1, I2, I3 {}
[Test]
public void InterfaceExtendsMultipleInterfaces()
{
result = i.List(typeof(ExtendsMultipleI));
AssertResult(typeof(ExtendsMultipleI), typeof(I1), typeof(I2), typeof(I3));
}
interface ExtendsExtendsI : ExtendsI {}
[Test]
public void InterfaceExtendsInterfaceExtendsInterface()
{
result = i.List(typeof(ExtendsExtendsI));
AssertResult(typeof(ExtendsExtendsI), typeof(ExtendsI), typeof(StandAloneI));
}
class ExtendsClassC : StandAloneC {}
[Test]
public void ClassExtendsClass()
{
result = i.List(typeof(ExtendsClassC));
AssertResult(typeof(ExtendsClassC), typeof(StandAloneC));
}
class ExtendsClassAndInterfaceC : StandAloneC, StandAloneI {}
[Test]
public void ClassExtendsClassAndInterface()
{
result = i.List(typeof(ExtendsClassAndInterfaceC));
AssertResult(typeof(ExtendsClassAndInterfaceC), typeof(StandAloneI), typeof(StandAloneC));
}
class ExtendsExtendsC : ExtendsClassC {}
[Test]
public void ClassExtendsClassExtendsClass()
{
result = i.List(typeof(ExtendsExtendsC));
AssertResult(typeof(ExtendsExtendsC), typeof(ExtendsClassC), typeof(StandAloneC));
}
// A - -> D -> X -
// -> C - -> Y -> Z
// B - -> E ------
interface A {}
interface B {}
interface C : A, B {}
interface D : C {}
interface E : C {}
class X : D {}
class Y : X, E {}
class Z : Y {}
[Test]
public void ReallyEvilClassHierarchy()
{
result = i.List(typeof(Z));
AssertResult(
typeof(Z),
typeof(D),
typeof(C),
typeof(A),
typeof(B),
typeof(E),
typeof(Y),
typeof(X)
);
}
private void AssertResult(params Type[] expected)
{
StringBuilder expectedString = new StringBuilder();
StringBuilder actualString = new StringBuilder();
foreach (Type t in expected)
{
expectedString.Append(t.Name);
expectedString.Append(",");
}
foreach (Type t in result)
{
actualString.Append(t.Name);
actualString.Append(",");
}
Assertion.AssertEquals(expectedString.ToString(), actualString.ToString());
}
}
}
|
|
From: <joe...@us...> - 2003-06-01 09:48:53
|
Update of /cvsroot/nmock/nmock/test/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv31005/test/NMock
Modified Files:
DynamicMockTest.cs
Log Message:
Added better support for mocking interface hierarchies (Jeremy Stell-Smith pointed out the brokenness of it all).
Index: DynamicMockTest.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/test/NMock/DynamicMockTest.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** DynamicMockTest.cs 13 Mar 2003 21:55:03 -0000 1.6
--- DynamicMockTest.cs 1 Jun 2003 09:48:49 -0000 1.7
***************
*** 9,13 ****
public class DynamicMockTest
{
! interface IBlah
{
object DoStuff(string name);
--- 9,18 ----
public class DynamicMockTest
{
! interface IBaseBlah
! {
! string GetSuperString();
! }
!
! interface IBlah : IBaseBlah
{
object DoStuff(string name);
***************
*** 119,122 ****
--- 124,138 ----
mock.Verify();
}
+
+ [Test]
+ public void MockingMembersFromBaseInterfaces()
+ {
+ IMock mock = new DynamicMock(typeof(IBlah));
+ mock.ExpectAndReturn("GetSuperString", "some string");
+
+ IBlah b = (IBlah) mock.MockInstance;
+
+ Assertion.AssertEquals("some string", b.GetSuperString());
+ }
interface IValueType
|
|
From: <joe...@us...> - 2003-06-01 09:48:52
|
Update of /cvsroot/nmock/nmock/src/NMock/Dynamic
In directory sc8-pr-cvs1:/tmp/cvs-serv31005/src/NMock/Dynamic
Modified Files:
ClassGenerator.cs
Added Files:
InterfaceLister.cs
Log Message:
Added better support for mocking interface hierarchies (Jeremy Stell-Smith pointed out the brokenness of it all).
--- NEW FILE: InterfaceLister.cs ---
using System;
using System.Collections;
using System.Reflection;
namespace NMock.Dynamic
{
// List all interfaces implemented by an interface (includes classes)
public class InterfaceLister
{
public Type[] List(Type i)
{
ArrayList found = new ArrayList();
walk(found, i);
return (Type[]) found.ToArray(typeof(Type));
}
private void walk(IList found, Type current)
{
if (current == null || current == typeof(Object))
{
return;
}
add(found, current);
foreach(Type superType in current.GetInterfaces())
{
add(found, superType);
}
walk(found, current.BaseType);
}
private void add(IList found, Type item)
{
if (!found.Contains(item))
{
found.Add(item);
}
}
}
}
Index: ClassGenerator.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/Dynamic/ClassGenerator.cs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ClassGenerator.cs 27 Feb 2003 22:45:51 -0000 1.9
--- ClassGenerator.cs 1 Jun 2003 09:48:49 -0000 1.10
***************
*** 17,41 ****
}
! public virtual object Generate(Type type, IMock mock, IList methodsToIgnore)
! {
! methodsToIgnore.Add("Equals");
! methodsToIgnore.Add("ToString");
! TypeBuilder typeBuilder = GetTypeBuilder("Mock" + type.Name, type);
! MethodImplementor methodImplementor = new MethodImplementor(typeBuilder);
! foreach ( MethodInfo methodInfo in type.GetMethods(ALL_INSTANCE_METHODS) )
! {
! if (IsOverridable(methodInfo) && !methodsToIgnore.Contains(methodInfo.Name))
! {
! methodImplementor.Implement(methodInfo);
! }
! }
! return CreateProxyInstance(typeBuilder, mock);
! }
! bool IsOverridable(MethodInfo m)
{
! return (m.IsVirtual && ! m.IsFinal);
}
--- 17,47 ----
}
! public virtual object Generate(Type type, IMock mock, IList methodsToIgnore)
! {
! methodsToIgnore.Add("Equals");
! methodsToIgnore.Add("ToString");
! TypeBuilder typeBuilder = GetTypeBuilder("Mock" + type.Name, type);
! MethodImplementor methodImplementor = new MethodImplementor(typeBuilder);
! foreach (Type currentType in new InterfaceLister().List(type))
! {
! foreach ( MethodInfo methodInfo in currentType.GetMethods(ALL_INSTANCE_METHODS) )
! {
! if (ShouldImplement(methodInfo, methodsToIgnore))
! {
! methodImplementor.Implement(methodInfo);
! }
! }
! }
! return CreateProxyInstance(typeBuilder, mock);
! }
! bool ShouldImplement(MethodInfo methodInfo, IList methodsToIgnore)
{
! if (!methodInfo.IsVirtual || methodInfo.IsFinal) {
! methodsToIgnore.Add(methodInfo.Name);
! }
! return !methodsToIgnore.Contains(methodInfo.Name);
}
|
|
From: <joe...@us...> - 2003-06-01 09:48:51
|
Update of /cvsroot/nmock/nmock/src/NMock
In directory sc8-pr-cvs1:/tmp/cvs-serv31005/src/NMock
Modified Files:
DynamicMock.cs
Log Message:
Added better support for mocking interface hierarchies (Jeremy Stell-Smith pointed out the brokenness of it all).
Index: DynamicMock.cs
===================================================================
RCS file: /cvsroot/nmock/nmock/src/NMock/DynamicMock.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** DynamicMock.cs 13 Mar 2003 22:22:11 -0000 1.8
--- DynamicMock.cs 1 Jun 2003 09:48:48 -0000 1.9
***************
*** 95,111 ****
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));
}
}
--- 95,118 ----
void checkMethodIsValid(string methodName)
{
!
! Type[] allTypes = new InterfaceLister().List(type);
! foreach (Type t in allTypes)
{
! MethodInfo method = t.GetMethod(methodName, ClassGenerator.ALL_INSTANCE_METHODS);
! PropertyInfo property = t.GetProperty(methodName, ClassGenerator.ALL_INSTANCE_METHODS);
! if (property != null)
! {
! return;
! }
! if(method != null)
! {
! if(!method.IsVirtual)
! {
! throw new ArgumentException(String.Format("method <{0}> is not virtual", methodName));
! }
! return;
! }
}
+ throw new MissingMethodException(String.Format("method <{0}> not defined", methodName));
}
|
|
From: Joe W. <jo...@tr...> - 2003-06-01 08:10:30
|
Thanks Jeremy - I'll look into this.
I noticed that your testcase extends Assertion - I presume this is so
it's easier to use use AssertBlah methods. Is this a pattern you use
frequently? Does anyone else do this?
-joe
Jeremy Stell-Smith wrote:
>hey guys, got another bug report/feature request.
>
>basically nmock croaks when trying to mock an
>interface that subclasses another one
>
>Jeremy
>
>PS sorry about the foo's joe :)
>
>using NMock;
>using NUnit.Framework;
>
>[TestFixture]
>public class NMockTest : Assertion
>{
> public interface ISuperFoo
> {
> string GetSuperString();
> }
>
> public interface IFoo : ISuperFoo
> {
> }
>
> [Test]
> public void MockingMembersFromBaseInterfaces()
> {
> IMock mock = new DynamicMock(typeof(IFoo));
> mock.ExpectAndReturn("GetSuperString", "some
>string");
>
> IFoo foo = (IFoo) mock.MockInstance;
>
> AssertEquals("some string",
>foo.GetSuperString());
> }
>}
>
>
>__________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo.
>http://search.yahoo.com
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: eBay
>Get office equipment for less on eBay!
>http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
>_______________________________________________
>Nmock-general mailing list
>Nmo...@li...
>https://lists.sourceforge.net/lists/listinfo/nmock-general
>
>
|