I have a
I have an Interface called IFileDownloader which has a signature called DownlowadFile(string url, string fileName)
I have a class, called, StockManager which implements this method. This class has another method called DownloadFiles(string url, String[] fileNames) which calls the Interface method. How can I use Rhino Mocks to verify that the signature was called for each of the passed file in the String[] fileNames?
I have implemented it for a single file but unsure how to modify it to take an ordered list? Here is my sample code:
var stubbedFileDownloader = MockRepository.GenerateMock<IFileDownloader>();
string url = "http://abc.def.klm/download/"
string EXPECTED_FILENAME = "AVC2.xml";
stubbedFileDownloader.Stub(x => x.DownloadFile(url, EXPECTED_FILENAME)
.Return(true);
var stockManager = new StockManager();
stockManager.DownloadFiles(url, new string[] { "AVC2.xml" } );
stubbedFileDownloader.VerifyAllExpectations();