Re:Ask HN: How do you test SQL?
by therealdrag0 on Wednesday February 01, 2023 @02:14AM
(#34607455)
Yep instead of starting the container in the build script it’s nice to start it in the test code file itself.
> Testcontainers for .NET is a library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions. The library is built on top of the .NET Docker remote API and provides a lightweight implementation to support your test environment in all circumstances.
Edit: Ok, example helps. https://dotnet.testcontainers.org/examples/aspnet/
I can declare docker infrastructure from my code, right?