改造单元测试以适应大型解决方案,IOC,最小起订量 [英] Retrofit unit tests to large solution, IOC, Moq

查看:111
本文介绍了改造单元测试以适应大型解决方案,IOC,最小起订量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对用VB.Net和c#编写的asp.net解决方案进行单元测试的改装. 单元测试需要验证当前的功能,并作为对未来重大更改的检查.

I am in the process of retrofitting unit tests for a asp.net solution written in VB.Net and c#. The unit tests need to verify the current functionality and act as a check for future breaking changes.

该解决方案包括:

1个MVC Web项目 用vb.net编写(不要问,这是一件很古老的事情)

1 MVC web project written in vb.net (don't ask, it's a legacy thing)

10个其他支持项目,每个项目均包含逻辑分组的功能 用C#编写,每个项目都包含存储库和DAL

10 other supporting projects each containing logically grouped functionality written in C#, each project contains repositories and DAL

由于尚未在任何地方实现控制反转(IOC),因此所有类都紧密耦合.

All the classes are tightly coupled as there is no inversion of control (IOC) implemented anywhere, yet.

当前要测试控制器,有以下堆栈:

currently to test a controller there is the following stack:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆