Hari Subramaniam
Hari Subramaniam

Reputation: 1876

Unit testing Azure table storage classes

I have been trying to find if i can easily isolate and test azure table storage dependencies but to to no avail. I believe its really difficult to mock/fake ATS dependencies. I am surprised at how the Azure team could ignore this in the age of TDD/BDD etc. Or is it am i missing something? From my undersntanding it has very minimal interface/abstract classes which make isolating them difficult.

Upvotes: 0

Views: 1335

Answers (1)

Igorek
Igorek

Reputation: 15850

You typically should be mocking repositories that retrieve or persist data. These can be mocked quiet easily. Why are you trying to mock the ATS dependencies themselves?

Furthermore, TableServiceEntity is not required to be inherited from. Feel free to implement your own interface instead - if for some reason you need to mock entities themselves.

Upvotes: 3

Related Questions