示例#1
0
 public void can_get_folders()
 {
     Assert.That(_sut.WorkingFolder() == @"..\..\TestFiles\Working\");
     Assert.That(_sut.GetUploadFolderFor("Initech") == @"\\automation\d$\Upload\Initech\Test\");
     Assert.That(_sut.GetUploadFolderFor("Edict") == @"\\automation\d$\Upload\Test\");
     Assert.That(_sut.DownloadFolder(), Is.StringContaining(@"..\..\TestFiles\Download\"
                                                            ));
 }
示例#2
0
        public void Save(EDITransmissionPackage ediTransmissionPackage)
        {
            var ediXmlInterchangeControl = ediTransmissionPackage.GetInterchangeControl();
            var fname       = GetFileName(ediTransmissionPackage);
            var workingName = _config.WorkingFolder() + fname;
            //string uploadName = ediTransmissionPackage.GetUploadFolder() + fname;
            var code      = ediTransmissionPackage.GetBusinessPartner();
            var pathToUse = TransmissionPath.Edict;

            if (code == BusinessPartner.Initech)
            {
                pathToUse = TransmissionPath.Initech;
            }
            var uploadName = _config.GetUploadFolderFor(pathToUse) + fname;

            _fileUtilities.SaveTextAndRename(ediXmlInterchangeControl.Value, workingName, uploadName);
        }
示例#3
0
 public static string GetUploadFolderFor(string partnerCode)
 {
     ensureInitialized();
     return(_config.GetUploadFolderFor(partnerCode));
 }