public void OneTimeSetupTestSuite() { var configsSuite = new ConfigsBeforeEachTestSuite(); var AssemblyDirectory = Assembly.Directory; TestSettings = configsSuite.TestSetup(AssemblyDirectory + ResourceConstants.SETTINGSPATH + "/TestSettings.json"); Environment = configsSuite.ReadEnvironmentFromJson(Assembly.Directory + ResourceConstants.SETTINGSPATH + "/Environment.json", TestSettings[TestSettingsConst.ENVIRONMENT]); ExtentTestManager.CreateParentTest(GetType().Name); }
public void ConfigsBeforeEachTestSuite_TestSetup() { var testSetup = new ConfigsBeforeEachTestSuite(); var result = testSetup.TestSetup(Assembly.Directory + "/TestSettings.json"); foreach (var v in result) { Console.WriteLine(v.Key + " " + v.Value); } Assert.True(result != null); }
public void ReadEnvironmentFromJson() { var testConfigs = new ConfigsBeforeEachTestSuite(); var env = testConfigs.ReadEnvironmentFromJson(Assembly.Directory + "/Environment.json", "UAT"); foreach (var keyValuePair in env) { Console.WriteLine(keyValuePair.Key + " " + keyValuePair.Value); if (keyValuePair.Key == "FrontEnd") { Assert.AreEqual(keyValuePair.Value, "http://fasteningcode.com/"); } } Console.WriteLine(env["DbConnUnsecured"]); }