Comments (2)
Have just hit this when trying to use Foq to mock the Microsoft.Azure.WebjobsDurableOrchestrationContextBase
type - I was attempting port the sample here https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-unit-testing#unit-testing-orchestrator-functions to use Foq
It should be noted that I can use Moq in f# to re-create that sample and mock the type without issue but I really like the use of quotations in Foq!
from foq.
Any progress on this issue? I just ran into it after upgrading to latest Azure.Storage.Blobs library (12.11.0). The Azure.Response
type can no longer be mocked:
let resp = Foq.Mock<Azure.Response>().Create()
Fails at runtime with System.TypeLoadException : Method 'set_IsError' on type 'Mock.Responseda15e24f-4b36-4ebb-a375-a1c2b3ef1ec8' from assembly 'Foq.Dynamic, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is overriding a method that is not visible from that assembly.
Edit: I just noticed that the IsError
property is not even virtual. Now I'm really confused.
from foq.
Related Issues (15)
- Support mocking multiple interfaces HOT 1
- Missing License HOT 1
- Please rename `Lib` directory to `lib` in the NuGet package HOT 3
- A mocked abstract base class is "not equal to itself"
- Unit type return results in InvalidProgramException HOT 3
- Issues asserting on constrained types HOT 1
- Is it possible to first get the abstract and then setup its behaviour?
- [Bug?] Cannot mock class with protected virtual method. HOT 1
- Foq error is very unhelpful for internal types
- How to mock a function (not a member)?
- ReturnFunc not working for int64 properties HOT 6
- Support for Xamarin Android HOT 3
- .net 4.6.1 HOT 1
- Release a new version HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foq.