Skip to content

Refactor and improve integration test fixtures. #359

@fiseni

Description

@fiseni

The fixtures for integration tests are not particularly nice. We created them a long time ago, and they need an update and improvement. Also, there are a few issues in the current setup.

  • We're working with a single database. That's not an extendable solution.
  • We're using the same DbContext instance within a test class. This can lead to unreliable tests, since the change tracker may already contain objects from other test runs.
  • For seeding, we're using HasData feature of EF Core. I'm not particularly a fan of it, since can lead to unreliable tests too.
  • The fixtures for EF Core and EF6 are not consistent.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions