示例#1
0
 public static ReturnMsg<string> Print(PrintData data)
 {
     string template = System.IO.Path.Combine(SettingConfig.TemplatePath, data.template);
     if (!File.Exists(template))
     {
         Downloader.DownLoadTemplate(new string[] { data.template });
     }
     IGenPrinter printer = new GenPrinter();
     ReportGenConfig printerConfig = new ReportGenConfig()
     {
         NumberOfCopies = SettingConfig.Copy,
         Printer = SettingConfig.PrinterName,
         PrinterType = SettingConfig.PrinterType,
         Template = template
     };
     return printer.Print(data.dataset, printerConfig);
 }
示例#2
0
        public void PrintTest()
        {
            string dnKey = "DN2013012820571";
            PrintData data;
            IRestDelivery restDelivery = new RestDelivery();
            data = restDelivery.DnItemPrintData(dnKey,200);

            IGenPrinter target = new GenPrinter();
            ReportGenConfig printerConfig = new ReportGenConfig()
            {
                NumberOfCopies = SettingConfig.Copy,
                Printer = SettingConfig.PrinterName,
                PrinterType = SettingConfig.PrinterType,
                Template = Path.Combine(SettingConfig.TemplatePath, data.template)
            };

            ReturnMsg<string> actual;
            actual = target.Print(data.dataset, printerConfig);
            Assert.AreEqual(true, actual.result);
        }
示例#3
0
 public void GenPrinterConstructorTest()
 {
     GenPrinter target = new GenPrinter();
     Assert.Inconclusive("TODO: 实现用来验证目标的代码");
 }