Ejemplo n.º 1
0
        /// <summary>
        /// Initialize unit tests with configuration
        /// </summary>
        static TestBase()
        {
            XElement element;

            using (FileStream stream = new FileStream(TestConfigurations.DefaultTestConfigFilePath, FileMode.Open))
            {
                element = XElement.Load(stream);
            }

            TestConfigurations configurations = TestConfigurations.ReadFromXml(element);

            TestBase.Initialize(configurations);
        }
Ejemplo n.º 2
0
        static TestBase()
        {
            try
            {
                XElement           element        = XElement.Load(TestConfigurations.DefaultTestConfigFilePath);
                TestConfigurations configurations = TestConfigurations.ReadFromXml(element);

                TestBase.Initialize(configurations);
            }
            catch (System.IO.FileNotFoundException)
            {
                throw new System.IO.FileNotFoundException("To run tests you need to supply a TestConfigurations.xml file with credentials in the Test/Common folder. Use TestConfigurationsTemplate.xml as a template.");
            }
        }