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\" )); }
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); }
public static string GetUploadFolderFor(string partnerCode) { ensureInitialized(); return(_config.GetUploadFolderFor(partnerCode)); }