RazorSlices icon indicating copy to clipboard operation
RazorSlices copied to clipboard

Add tests

Open DamianEdwards opened this issue 1 year ago • 1 comments

It's time. Too easy to regress stuff now.

Thinking as a start I'll use WebApplicationFactory to test all the endpoints in the sample app. This will be in-process and thus not native AOT or trimmed. I can then have another test that publishes the app and tests the endpoints for real. Ideally would do it for both PublishTrimmed and PublishAot which will likely require manipulating the project file as I've hit issues passing -p:PublishAot=true/-p:PublishTrimmed=true at the command line as it ends up applying to the source generator project too which causes errors as it targets .NET Standard which isn't compatible with trimming or native AOT.

DamianEdwards avatar Jun 07 '24 18:06 DamianEdwards

Added WebApplicationFactory based tests for the sample webapp.

DamianEdwards avatar Jun 08 '24 21:06 DamianEdwards