我尝试为一些有存储过程的方法创建单元测试。下面是我的问题。
如何对使用大量存储过程从数据库获取数据进行验证的项目进行单元测试?- If i have to use the mock data, how to get the copy of the data from database locally?- How to mimic the stored proc
我使用配置构建路径设置引用了另一个项目中的一个项目。If running in the context of a test using the mocking API or bootstrap Grails correctly.通常这是通过@Mock (使用Mockito)或mockDomain()修复的,但我不在单元测试中,所以看不到这些项。
如果我的服务层看不到我需要使用的域对象,我如何通过集成
嗨,我正在用存储库模式对实体框架进行单元测试。我只是尝试在我的测试项目中模拟一个存储库类。private Mock<IStudentRepository> repositoryMock; Using Moq; // is that correct???????但是程序集引用/指令缺少错误显示,所以我尝试添加引用,但我无法理解哪个是Moq