Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and improve integration test fixtures. #359

Closed
fiseni opened this issue Aug 5, 2023 · 0 comments · Fixed by #360
Closed

Refactor and improve integration test fixtures. #359

fiseni opened this issue Aug 5, 2023 · 0 comments · Fixed by #360
Assignees

Comments

@fiseni
Copy link
Collaborator

fiseni commented Aug 5, 2023

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant