On 5 окт, 14:46, "Ken Egozi" <
egoz...@gmail.com> wrote:
> what people usually do for end-to-end tests is to setup an in-memory DB
> like Sql-Lite, use NH (or AR) to generate the schema on fixture setup, then
> do the "put test data in the DB, query and assert" which should run fast-ly
> as it's in memory.
>
> personally I try to have as less db-involving tests as possible, and not to
> run them on every build (only daily or pre-deploy), then I use my regular DB
> for these (- SQL Server).
>
> I need not NH's ability to Load by PK, or simple queries/criterias.
> I trust NH for testing NH.
> So the controller/service tests would simply use faked repositories, while
> repository tests (which will involve the DB) will be kept to the complex
> scenarios - i.e when I need to make sure that a complex query actually
> returns what it's supposed to do.
>