Exemplo n.º 1
0
 public AutoTestCase(string testCaseDirectoryPath, TestCaseConfig config, string payload, ILoggerManager logger, bool allowArchving)
 {
     this.CurrentFolderPath = testCaseDirectoryPath;
     this.TestCaseConfig    = config;
     this.Payload           = payload;
     this.logger            = logger;
     this.AllowArchiving    = allowArchving;
 }
Exemplo n.º 2
0
        public TestCaseConfig(IConfiguration config, string configFileName)
        {
            var tcConfig = new TestCaseConfig();

            config.Bind(tcConfig);

            var headers = new Dictionary <string, string>();

            config.GetSection("Headers").Bind(headers);
            tcConfig.Headers = headers.ToList();

            configureTestCase(tcConfig.EndPoint1, tcConfig.EndPoint2, tcConfig.Headers, tcConfig.CallType, tcConfig.HttpMethod, tcConfig.SoapAction, tcConfig.PayloadFilePath, configFileName);
        }
Exemplo n.º 3
0
        public AutoTestCase(string testCaseDirectoryPath, TestCaseConfig testCaseConfig, string payloadFileName, string reportResultsFileName, ILoggerManager logger, bool allowArchiving)
        {
            this.CurrentFolderPath = testCaseDirectoryPath;
            this.logger            = logger;
            this.AllowArchiving    = allowArchiving;

            this.PayloadFileName = payloadFileName;
            this.ReportFileName  = reportResultsFileName;

            this.TestCaseConfig = testCaseConfig;
            if (string.IsNullOrEmpty(this.TestCaseConfig.PayloadFilePath))
            {
                this.Payload = File.ReadAllText(Path.Combine(this.CurrentFolderPath, PayloadFileName));
            }
            else
            {
                this.Payload = File.ReadAllText(this.TestCaseConfig.PayloadFilePath);
                this.WriteTextFile(Path.Combine(this.CurrentFolderPath, PayloadFileName), this.Payload).Wait();
            }
        }