Giter Club home page Giter Club logo

Comments (4)

kzu avatar kzu commented on July 29, 2024

yuck, could you also post that question to the Castle DynamicProxy guys?

/kzu

Daniel Cazzulino

On Tue, Apr 9, 2013 at 2:54 PM, Pier Janssen [email protected]:

I'm writing unittests for an application which makes use of a third party
API, with some generated interfaces. I was getting some strange exceptions
trying to create a mock object for a complex interface. After much digging,
I found that one of these interfaces it extends has a declaration with a
ref keyword in it:

public interface IReferenceMaker{
RefResult NotifyRefChanged(ref UIntPtr partID, RefMessage message);}

When trying to create a mock object for this interface, an exception is
thrown when accessing the Object property: ArgumentException: Type
System.UIntPtr could not be converted to a OpCode.

Mock mockRefMaker = new Mock();IReferenceMaker refMaker = mockRefMaker.Object;

Unfortunately I can't change the interface in any way, so I'm looking for
a way to work around the issue on the Moq side.
Any ideas?


Reply to this email directly or view it on GitHubhttps://github.com//issues/42
.

from moq4.

Pjanssen avatar Pjanssen commented on July 29, 2024

Done: http://issues.castleproject.org/issue/DYNPROXY-188

from moq4.

dtuchlinsky avatar dtuchlinsky commented on July 29, 2024

It appears this was fix when upgrading to Castle 3.3.3 #204.

from moq4.

stakx avatar stakx commented on July 29, 2024

@dtuchlinsky: Thanks for the hint. This was fixed back in version 4.2.1510.2205 (which was the first version based on Castle 3.3.3).

from moq4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.