示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (checkBoxOverrideLog.Checked)
            {
                _outPutManager.Clear();
            }

            _outPutManager.PrintText("Starting Directory-Export...\n", Color.Blue);

            ExportModel model = createExportModel();

            DirectoryExporter exporter = new DirectoryExporter(model);

            applyMessenging(exporter);

            exporter.Start();
        }
        public void TestStart()
        {
            //Arrange
            ExportModel       model    = CreateModel();
            DirectoryExporter importer = new DirectoryExporter(model, _fileHandler);

            //Act
            importer.Start();

            //Assert
            Assert.True(_fileHandler.FileSys.File.Exists(@"c:\NotfallImporter\Import\vmi_20190304121156_99998_0000798569_0170631125_0123456789.idx"));
            Assert.True(_fileHandler.FileSys.File.Exists(@"c:\NotfallImporter\Import\vmi_20190304121156_99998_0000798569_0170631125_0123456789.zip"));
            Assert.True(_fileHandler.FileSys.File.Exists(@"c:\NotfallImporter\Import\vmi_20190304121156_99998_0000798569_0170631125_0123456789.rdy"));

            Assert.True(_fileHandler.FileSys.File.Exists(@"c:\NotfallImporter\Import\eml_20190220123417_99802_0000009200.zip"));
            Assert.True(_fileHandler.FileSys.File.Exists(@"c:\NotfallImporter\Import\eml_20190220123417_99802_0000009200.idx"));
            Assert.True(_fileHandler.FileSys.File.Exists(@"c:\NotfallImporter\Import\eml_20190220123417_99802_0000009200.rdy"));
        }