I have a factory that looks like below:
public IFoo GetFoo(IFile file)
{
return _kernel.Get<IFoo>(new ConstructorArgument("file", file));
}
It works fine until I use Moq to mock IFoo
. In the mock there is no constructor argument named file, and I get a Ninject.ActivationException.
How should I solve this?