Skip to content

Add support for WebApplicationFactory#465

Merged
SimonCropp merged 11 commits intoVerifyTests:mainfrom
OskarKlintrot:main
Apr 3, 2022
Merged

Add support for WebApplicationFactory#465
SimonCropp merged 11 commits intoVerifyTests:mainfrom
OskarKlintrot:main

Conversation

@OskarKlintrot
Copy link
Copy Markdown
Contributor

@OskarKlintrot OskarKlintrot commented Mar 22, 2022

Fixes #435

No test cases for WebApplicationFactory yet, I open this PR just because it's much easier to show the diff in a PR.

@dnfadmin
Copy link
Copy Markdown

dnfadmin commented Mar 22, 2022

CLA assistant check
All CLA requirements met.

@OskarKlintrot
Copy link
Copy Markdown
Contributor Author

@SimonCropp I accidently check the wrong radio button in the CLA, can you revoke my signing so I can redo it? I can't change it now unfortunately.

@OskarKlintrot OskarKlintrot marked this pull request as ready for review March 22, 2022 12:27
Comment thread src/Verify.EntityFramework.Tests/CoreTests.cs
@SimonCropp
Copy link
Copy Markdown
Member

if u run two tests in parallel, wont the results overlap?

@OskarKlintrot
Copy link
Copy Markdown
Contributor Author

You're right, they will mess with each others data :(

@OskarKlintrot
Copy link
Copy Markdown
Contributor Author

Now the tests can be run in parallel. It tok a lot of code and some new public facing api's though...

@OskarKlintrot
Copy link
Copy Markdown
Contributor Author

OskarKlintrot commented Mar 29, 2022

I totally forgot that the interceptor is singleton in each WebApplicationFactory, they aren't sharing the same singleton instance (which I think was the case in EF6, didn't you put DbInterception in Application_Start or something similar?). Now the PR looks a bit cleaner.

@OskarKlintrot
Copy link
Copy Markdown
Contributor Author

OskarKlintrot commented Mar 30, 2022

I haven't written any docs btw, I'll do it if you think this PR makes sense :)

@SimonCropp
Copy link
Copy Markdown
Member

i think this looks good. if you add some docs we can merge and deploy

@OskarKlintrot
Copy link
Copy Markdown
Contributor Author

Great! I added a section about WebApplicationFactory, I hope it makes sense! I changed a few variables in the tests to make the docs coherent.

@SimonCropp SimonCropp merged commit 1b439a5 into VerifyTests:main Apr 3, 2022
@SimonCropp SimonCropp added the Bug label Apr 3, 2022
@SimonCropp SimonCropp added this to the 6.4.0 milestone Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Verify entityframework library with webapplicationfactory

4 participants