如何对与 VS DOM 交互的 Visual Studio AddIn 进行单元测试
我开发了一个 Visual Studio 插件,它与 Visual Studio DOM 交互并修改加载的解决方案。
虽然我努力分离与 DOM 交互的代码,并可以通过单元测试对其他业务逻辑进行单元测试,但有没有一种方法可以对 VS DOM 交互功能和将自定义菜单项添加到的加载项初始化代码进行单元测试视觉工作室?
I have developed a Visual Studio Add-In which interacts with the Visual Studio DOM and amends the loaded solution.
While I have endevoured to seperate the code which interacts with the DOM and can unit test the other business logic via unit tests, is there a way to unit test the VS DOM interaction functionality and the Add-In initialisation code which adds custom menu items to Visaual Studio?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能会以某种方式回答这个问题...我有一个代码示例来创建一个 DTE VS 实例,我希望我可以在单元测试中使用它来注入我的类,它与 VS 交互,然后希望分析 DTE 对象来确认测试成功标准。我还没有抽出时间在测试中尝试它,但它看起来很有希望。
This may go some way to answer this... I've got a code sample to create a DTE VS instance which i'm hoping I can then use in my unit test to inject into my class, which interacts with VS, and then hopefully analyse the DTE object to confirm the tests success criteria. I havent got round to trying it within a test but it looks promising.