Giter Site home page Giter Site logo

Comments (3)

stakx avatar stakx commented on July 19, 2024 1

Moq internals have been extensively refactored since 2017, so if you are relying on internal implementation details (which is obviously not a recommended approach) then yes, you'll have to adjust your code.

The functionality that was once located in Moq.MethodCallReturn<,> likely still exists somewhere else (possibly in Moq.Language.Flow.NonVoidSetupPhrase<,> and MethodCall), but I don't remember the exact details about that particular refactoring. If you want to bypass the public API, you're basically on your own.

from moq4.

stakx avatar stakx commented on July 19, 2024

I dont see anything in the changelog mentioning a replacement or removal of this method

First of all, you probably meant a type called Moq.MethodCallReturn`2, not Moq.MethodCallReturns'2 – the latter didn't exist in version 4.1.1309.1617, as far as I can tell.

Second, this was an internal type and not part of the public API, which is why the changelog does not need to mention any changes to (or even the removal of) it. If you use Reflection to get at private Moq bits, you basically have no guarantee that this is going to continue working forever. If you want to be safer, use only the public API.

from moq4.

Jepsens1 avatar Jepsens1 commented on July 19, 2024

Yes looking at the package in resharper dotpeek, its called Moq.MethodCallReturn`2

This code was back in 2017 and has not being touched since, so this will require a complete rework of the unit test to be part of the public API and due to the fact there is no replacement, right?

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.