Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用Autofaq和Moq的AutoMock集成
有没有办法从中获得模拟AutoMock.Create<Service>()?
AutoMock.Create<Service>()
我想要这个的原因是模拟被测类(服务)的一些方法,如这里所示,并保持模拟依赖项的自动创建。
var mock = Mock.Get(myMockedService); mock.Setup(...)