Example #1
0
        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));
        }
Example #2
0
 private static void ensureInitialized()
 {
     if (_config != null)
     {
         return;
     }
     _config = new AFPSTConfiguration();
 }
Example #3
0
        public void Setup()
        {
            StructureMapBootstrapper.Execute();
            ObjectFactory.Configure(x =>
            {
                x.For <IServiceBus>().Use <FakeServiceBus>();
                x.For <IEndpointCache>().Use <FakeEndpointResolver>();
            });

            _container     = ObjectFactory.Container;
            _configuration = new AFPSTConfiguration();
        }
Example #4
0
 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;
 }
Example #7
0
 public CreateEdiDocumentFrom(IAFPSTConfiguration configuration)
 {
     _configuration = configuration;
 }
 public void SetUp()
 {
     _sut = new AFPSTConfiguration();
 }
Example #9
0
 public EdiDocumentSaver(IAFPSTConfiguration config, IFileUtilities fileUtilities)
 {
     _config        = config;
     _fileUtilities = fileUtilities;
 }
Example #10
0
 public static string GetUploadFolderFor(this IAFPSTConfiguration config, TransmissionPath path)
 {
     return(config.GetSettingBasedOnTestMode(string.Format("{0}UploadFolder", path)));
 }
Example #11
0
 public static string GetUploadFolderFor(this IAFPSTConfiguration config, string partnerCode)
 {
     return(config.GetSettingBasedOnTestMode(string.Format("{0}UploadFolder", partnerCode)));
 }
Example #12
0
 public static string ArchiveFolder(this IAFPSTConfiguration config)
 {
     return(config.GetSettingBasedOnTestMode("ArchiveFolder"));
 }
Example #13
0
 public static string EmailServiceEndpoint(this IAFPSTConfiguration config)
 {
     return(config.GetSettingBasedOnTestMode("EmailServiceEndpoint"));
 }
Example #14
0
 public static bool RecreateTables(this IAFPSTConfiguration config)
 {
     return(config.GetSettingBasedOnTestMode("RecreateTables") != "0");
 }