public static string DownloadFolder(this IAFPSTConfiguration config) { var folder = config.GetSettingBasedOnTestMode("DownloadFolder"); if (Directory.Exists(folder)) { return(folder); } //Folder doesn't exist, maybe we're running an Integration Test //Let's See if we can figure it out. bool isRealativePath = folder.StartsWith("."); bool isRunningTestInVisualStudio = Directory.GetCurrentDirectory().EndsWith("Debug"); if (isRunningTestInVisualStudio && isRealativePath) { //Let's try babacking up a couple directories var newfolder = @"..\..\" + folder; if (Directory.Exists(newfolder)) { return(newfolder); } } throw new ConfigurationErrorsException(string.Format("The DownloadFolder '{0}' does not exist.", folder)); }
private static void ensureInitialized() { if (_config != null) { return; } _config = new AFPSTConfiguration(); }
public void Setup() { StructureMapBootstrapper.Execute(); ObjectFactory.Configure(x => { x.For <IServiceBus>().Use <FakeServiceBus>(); x.For <IEndpointCache>().Use <FakeEndpointResolver>(); }); _container = ObjectFactory.Container; _configuration = new AFPSTConfiguration(); }
public void SetUp() { _sut = new AFPSTConfiguration(); }
private static void ensureInitialized() { if (_config != null) return; _config = new AFPSTConfiguration(); }
public EdiDocumentSaver(IAFPSTConfiguration config, IFileUtilities fileUtilities) { _config = config; _fileUtilities = fileUtilities; }
public CreateEdiDocumentFrom(IAFPSTConfiguration configuration) { _configuration = configuration; }
public static string GetUploadFolderFor(this IAFPSTConfiguration config, TransmissionPath path) { return(config.GetSettingBasedOnTestMode(string.Format("{0}UploadFolder", path))); }
public static string GetUploadFolderFor(this IAFPSTConfiguration config, string partnerCode) { return(config.GetSettingBasedOnTestMode(string.Format("{0}UploadFolder", partnerCode))); }
public static string ArchiveFolder(this IAFPSTConfiguration config) { return(config.GetSettingBasedOnTestMode("ArchiveFolder")); }
public static string EmailServiceEndpoint(this IAFPSTConfiguration config) { return(config.GetSettingBasedOnTestMode("EmailServiceEndpoint")); }
public static bool RecreateTables(this IAFPSTConfiguration config) { return(config.GetSettingBasedOnTestMode("RecreateTables") != "0"); }