-
RC2 doesn't work for mocking generics. It complains of a TypeLoad exception.
RC1 works fine.
2009-06-24 22:38:36 UTC by nobody
-
Currently, I don't see it's possible to fake static methods which is needed maybe in every project.
I think the quickest way to implement this is to have a look at the TypeMock assembly code using .NET Reflector, then finding
out how they are implementing how to fake static methods and finally writing your own customized NMock version.
I attached the assembly as well (it's free to...
2009-06-05 10:55:11 UTC by nobody
-
i am working on .net compact framework for years. i could contribute to provide a CF version.
2009-05-25 04:00:27 UTC by arnokan
-
it's every encouraging to see this nice & clean solution, any chance to provide a .net compact version?.
2009-05-25 03:57:12 UTC by arnokan
-
am getting this error when trying to set an expectation on an object I mocked that inherits from MembershipUser:
ContactRepositoryTests.UpdateTest : FailedSystem.InvalidProgramException: JIT Compiler encountered an internal limitation.
Server stack trace:
at MockObjectType1.ToString()
Exception rethrown at [0]:
at...
2009-04-02 13:58:59 UTC by kamoku-wan
-
We are mocking an interface which includes an int property with both get and set accessors:
int MaxParasToScan
{
get;
set;
}
In most cases, nMock's ClassGenerator.Generate() produces correct code, a single MaxParasToScan property with both a getter and a setter. But in some environments, it generates code as in the file BadMockIVwRootBox.cs, which I will attempt to attach...
2008-12-22 20:00:45 UTC by kenzook
-
I have to correct myself: It is possible to mark parameters as [In] parameters with attributes in C#.
2008-11-10 14:37:52 UTC by nobody
-
The following IL method declaration is part of an interface generated by the Typelib importer.
...
.method public hidebysig newslot abstract virtual instance int32
GetItem(
[in] string marshal( bstr) bstrItemName,
[out] object& marshal( iunknown ) ppItem)
runtime managed internalcall preservesig
{
}
...
When trying to mock this interface by nmock2 mocks I get an exception...
2008-11-10 14:15:44 UTC by nobody
-
I'm new to NUnit/NMock and TDD/Mocking in general, so this may be something stupidly simple that I've overlooked. I get an exception any time I try to mock an interface containing the ToString() method, even if the test itself has nothing to do with the ToString() function. If I comment out this method from the interface, the exception goes away. Any assistance you can provide would be appreci.
2008-08-07 20:16:48 UTC by nobody
-
Doh!
Thanks for your help anyway.
Regards,
Stenio.
2008-07-17 14:04:17 UTC by stenio