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

Consider generating model classes to improve test coverage #12014

Open
12 tasks
AndriySvyryd opened this issue May 15, 2018 · 2 comments
Open
12 tasks

Consider generating model classes to improve test coverage #12014

AndriySvyryd opened this issue May 15, 2018 · 2 comments

Comments

@AndriySvyryd
Copy link
Member

AndriySvyryd commented May 15, 2018

This would allow to reuse the same test code for different permutations of

  • Virtual/non-virtual/Lazy loading/Proxies
  • Auto/backing fields/indexer/no property
  • public/private field/property
  • public setter/private setter/readonly/constructor only
  • Snapshot/Changed/Full notifications
  • new/override/explicit implementation properties
  • nullable/non-nullable properties and navigations
  • CLR default/custom default/calculated property
  • Reference and collection navigations non-initialized/initialized in constructor
  • Navigations to exact type/base/interface
  • Custom Equals/GetHashCode
  • Collection types (IEnumerable/read-only/immutable/etc.)
@ajcvickers
Copy link
Contributor

Time-box to 1 week for now, and let's see where we get.

@ajcvickers ajcvickers modified the milestones: Backlog, 2.2.0 Jun 5, 2018
@ajcvickers ajcvickers modified the milestones: 2.2.0, 3.0.0 Aug 3, 2018
@ajcvickers ajcvickers modified the milestones: 3.0.0, Backlog Jan 28, 2019
@ajcvickers ajcvickers modified the milestones: Backlog, 3.1.0 Sep 4, 2019
@AndriySvyryd
Copy link
Member Author

Design proposal:

  • Tests are written against interfaces that are implemented implicitly or explicitly by DbContext and model classes
  • The entity class generator takes an IModel created with a sample implementation as an input and outputs the requested DbContext and model classes implementations in .cs files

@ajcvickers ajcvickers modified the milestones: 3.1.0, Backlog Oct 11, 2019
@ajcvickers ajcvickers modified the milestones: Backlog, MQ Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants