Unit Test Initialization and Cleanup for Windows Azure Storage Emulator
My unit tests add and delete entities from local Windows Azure dev storage, at their most basic. If the Azure Storage emulator isn’t started, the tests don’t fail quickly – they just sit there acting like the test framework is hung. In order to ensure that the tests proceed, I needed to make sure the emulator was started before the tests ran. I started with code found in this thread on StackOverflow . I needed to make sure the Storage Emulator is started before the test classes are called and that the emulator is shut down when the tests are done. I wrote this class and added it as a separate file to my test assembly. More information about CSRun.exe and the Process class are available in MSDN . // ----------------------------------------------------------------------- // <copyright file="AssemblySpecific.cs" company="BerryIntl"> // Berry International 2011 // </copyright> // -----------------------------------------------------