Exemplo n.º 1
0
        public void Init()
        {
            Configuration = GetApplicationConfiguration(TestContext.CurrentContext.TestDirectory);
            Assert.NotNull(Configuration.RootUrl, "Server URL for tests executions is not set");
            Assert.NotNull(Configuration.UserName, "Default user name for tests executions is not set");
            Assert.NotNull(Configuration.Password, "Default password for tests executions is not set");

            Logger = new LoggerConfiguration().MinimumLevel.Debug().WriteTo.Console().CreateLogger();
            HttpResponseMessageExtension.Init(Logger);
        }
Exemplo n.º 2
0
        public static BaseTestConfiguration GetApplicationConfiguration(string outputPath)
        {
            var configuration = new BaseTestConfiguration();

            var iConfig = GetIConfigurationRoot(outputPath);

            iConfig
            .GetSection("Server")
            .Bind(configuration);

            return(configuration);
        }
Exemplo n.º 3
0
 public static void Init(BaseTestConfiguration configuration)
 {
     _configuration = configuration;
 }