public void PreviewDocument() { var printProcessor = new PrintProcessorCollection(Enumerable.Empty <Printing.PrintProcessor.PrintProcessor>()); var windowProvider = new Mock <IWindowProvider>(); printProcessor.PreviewDocument(windowProvider.Object); windowProvider.Verify(i => i.Show(It.IsNotNull <string>(), It.IsNotNull <DocumentViewer>()), Times.Never); }
public void PreviewDocument1() { var printDialog = new Mock <IPrintDialog>(); var testPrintProcessor = new TestPrintProcessor { PrintDialog = printDialog.Object }; var printProcessor = new PrintProcessorCollection(testPrintProcessor); var windowProvider = new Mock <IWindowProvider>(); printProcessor.PreviewDocument(windowProvider.Object); windowProvider.Verify(i => i.Show(It.IsNotNull <string>(), It.IsNotNull <DocumentViewer>()), Times.Once); }
public void PreviewDocument() { var printProcessor = new PrintProcessorCollection(Enumerable.Empty<Printing.PrintProcessor.PrintProcessor>()); var windowProvider = new Mock<IWindowProvider>(); printProcessor.PreviewDocument(windowProvider.Object); windowProvider.Verify(i => i.Show(It.IsNotNull<string>(), It.IsNotNull<DocumentViewer>()), Times.Never); }
public void PreviewDocument1() { var printDialog = new Mock<IPrintDialog>(); var testPrintProcessor = new TestPrintProcessor(); testPrintProcessor.PrintDialog = printDialog.Object; var printProcessor = new PrintProcessorCollection(testPrintProcessor); var windowProvider = new Mock<IWindowProvider>(); printProcessor.PreviewDocument(windowProvider.Object); windowProvider.Verify(i => i.Show(It.IsNotNull<string>(), It.IsNotNull<DocumentViewer>()), Times.Once); }