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
An exception is thrown when trying to create an instance which has a dependency set to null:
var mocker = new AutoMoqer(); mocker.SetInstance<SomeDependency>(null); mocker.Create<SomeClassWithSomeDependency>(); // here the exception is thrown
Exception details:
Message: Castle.DynamicProxy.InvalidProxyConstructorArgumentsException : Can not instantiate proxy of class: ZTool.Data.DataContext. Could not find a parameterless constructor. Stack Trace: ProxyGenerator.CreateClassProxyInstance(Type proxyType, List`1 proxyArguments, Type classToProxy, Object[] constructorArguments) ProxyGenerator.CreateClassProxy(Type classToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options, Object[] constructorArguments, IInterceptor[] interceptors) CastleProxyFactory.CreateProxy(Type mockType, IInterceptor interceptor, Type[] interfaces, Object[] arguments) line 62 Mock`1.InitializeInstance() line 311 Mock`1.OnGetObject() line 325 Mock.get_Object() line 179 AutoMoqer.<GetParameters>b__9_0(ParameterInfo p) SelectArrayIterator`2.ToArray() Enumerable.ToArray[TSource](IEnumerable`1 source) AutoMoqer.GetParameters(ConstructorInfo constructor) AutoMoqer.Create(Type type) AutoMoqer.Create[T]()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
An exception is thrown when trying to create an instance which has a dependency set to null:
Exception details:
The text was updated successfully, but these errors were encountered: