Ejemplo n.º 1
0
 public void Import_NullPath_Throws()
 {
     var mockPdfImport = new Mock<IPdfImporter>();
     var mockImageImport = new Mock<IImageImporter>();
     var importer = new ScannedImageImporter(mockPdfImport.Object, mockImageImport.Object);
     Assert.Throws<ArgumentNullException>(() => importer.Import(null));
 }
Ejemplo n.º 2
0
 public void Import_PdfExtension_CallsPdfImporter()
 {
     const string filePath = "something.pdf";
     var mockPdfImport = new Mock<IPdfImporter>();
     var mockImageImport = new Mock<IImageImporter>();
     var importer = new ScannedImageImporter(mockPdfImport.Object, mockImageImport.Object);
     importer.Import(filePath);
     mockPdfImport.Verify(x => x.Import(filePath));
 }