We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assuming AutoMock should support Mock's functionalities - AutoMock fails to create a mock object for a delegate type
public interface MyInterface { delegate int MyDelegate(int x); } public class ReproTest { [Fact] public void Repro() { var autoMock = AutoMock.GetLoose().Mock<MyInterface.MyDelegate>(); // FAIL, unable to cast exception var mock = new Mock<MyInterface.MyDelegate>(); // OK mock.Setup(x => x(It.IsAny<int>())).Returns(20); // OK } }
Successful creation of an auto mock from a delegate type
Unable to cast object of type 'MyDelegate' to type 'Moq.IMocked`1[MyInterface+MyDelegate]'.
Happens in AutoMock.Mock method, when casting to IMocked<T>
IMocked<T>
var obj = (IMocked<T>)Create<T>(true, parameters);
Autofac: 6.1.1.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the Bug
Assuming AutoMock should support Mock's functionalities - AutoMock fails to create a mock object for a delegate type
Steps to Reproduce
Expected Behavior
Successful creation of an auto mock from a delegate type
Exception with Stack Trace
Happens in AutoMock.Mock method, when casting to
IMocked<T>
Dependency Versions
Autofac: 6.1.1.0
The text was updated successfully, but these errors were encountered: