public void DownloadSyncTest() { // Arrange string filePath = String.Empty; string url = "http://somepage.com"; var webClientStub = MockRepository.GenerateStub <WebClient>(); // Act var wd = new WebDownloader(webClientStub); wd.DownloadSync(filePath, url); // Assert webClientStub.AssertWasCalled(wc => wc.DownloadFile(Arg<Uri>.Is.Equal(new Uri(url)), Arg<String>.Is.Equal(filePath))); }