I\'m trying to write unit tests for my AzureBlobRepository. The repository receives a CloubBlobClient in the constructor. I want to mock the client, but this gives an except
See this CloudBlobContainer. This type contains three constructors. And constructor is required for create instance of type. Try to type in your code new CloudBlobContainer
and you will need to choose one of three constructors. AutoMock cannot know what constructor must choose.
You can say to AutoMock how to create CloudBlobContainer
Sample:
using (var mock = AutoMock.GetLoose())
{
mock.Provide(new NamedParameter("uri", new Uri("your uri")));
var mockClient = mock.Mock();
}