public void Create_Quote_Using_ViewModel() { Mock<IApplicationSettings> appSettings = new Mock<IApplicationSettings>(); appSettings.SetupGet(n => n.Culture).Returns("en-ZA"); appSettings.SetupGet(n => n.CompanyName).Returns("Test Company"); appSettings.SetupGet(n => n.CompanyAddressLine1).Returns("Test Company Address Line 1"); appSettings.SetupGet(n => n.CompanyAddressLine2).Returns("Test Company Address Line 2"); appSettings.SetupGet(n => n.CompanyCityTown).Returns("Port Elizabeth"); appSettings.SetupGet(n => n.CompanyCode).Returns("6001"); PdfFileQuoteMaker pdfQuoteMaker = new PdfFileQuoteMaker(appSettings.Object); QuoteViewModelBuilder quoteBuilder = new QuoteViewModelBuilder(); pdfQuoteMaker.CreateQuote(quoteBuilder.WithDefaults().Return()); }
private void PreviewDocumentUsyingSystemProcess() { PdfFileQuoteMaker pdfQuoteMaker = new PdfFileQuoteMaker(_appSettings); pdfQuoteMaker.CreateQuote(this); using (Process process = new Process()) { process.StartInfo = new ProcessStartInfo(this.FileName); process.Start(); } }