How to fake Azure Table Storage in .NET for Unit Testing?

Erick T picture Erick T · Jan 8, 2011 · Viewed 12.9k times · Source

I am working on a system that uses Azure Table Storage. In other systems (e.g., SQL, File based, etc), I can write a fake that allows me to test my data persistence logic. However, I can't see an easy way to create a fake for the Azure Table Service.

I could create a new IIS project that behaves the same way, but that isn't a good way to write a unit test, it is more of an integration test.

Any thoughts on how to unit test data access code that uses the Azure Table Storage client?

Answer

Dan Csharpster picture Dan Csharpster · Dec 9, 2015

I was considering this more for integration testing, but I suppose it could also work for unit testing. Meet Azure Storage Emulator. It sounds like a very awesome tool for testing Azure Blob, Queue and Table Services. I'm play around with it and try to post my findings if I can remember to do so.