mag*_*gol 5 .net c# ninject moq ninject-2
我有一个工厂,如下所示:
public IFoo GetFoo(IFile file)
{
return _kernel.Get<IFoo>(new ConstructorArgument("file", file));
}
Run Code Online (Sandbox Code Playgroud)
它工作正常,直到我使用 Moq 来模拟IFoo. 在模拟中没有名为 file 的构造函数参数,我得到一个 Ninject.ActivationException。
我应该如何解决这个问题?
| 归档时间: |
|
| 查看次数: |
1633 次 |
| 最近记录: |