Blog Posts with Tag Unit Tests
Reading Reference Data in .NET Unit Tests
When I'm unit testing in .NET many times I need a very large string or set of data to provide as input to a test case or as a final insertion. I like to use XUnit, but there aren't a lot of clear options to do this in any unit testing framework. One way to do this is to just store the large amount of data in a file somewhere near the test it's self. Common options to reference this file are around finding the test assembly DLL, making sure the files are copied to the output…
March 26, 2022
|
approximately 2 minutes to read