コード例 #1
0
        public void CollectSourceInformationIsByDefaultTrueWhenNotSpecified()
        {
            string runSettingxml =
                @"<RunSettings>
                  <RunConfiguration>
                  </RunConfiguration>
                  </RunSettings>";

            RunConfigurationSettings configurationSettings = RunConfigurationSettings.GetSettings(runSettingxml, RunConfigurationSettings.SettingsName);

            Assert.IsTrue(configurationSettings.CollectSourceInformation);
        }
コード例 #2
0
        public void CollectSourceInformationShouldBeConsumedFromRunSettingsWhenSpecified()
        {
            string runSettingxml =
                @"<?xml version=""1.0"" encoding=""utf-8""?>
                <RunSettings>
                     <RunConfiguration>
                       <ResultsDirectory>.\TestResults</ResultsDirectory>
                       <CollectSourceInformation>false</CollectSourceInformation>
                     </RunConfiguration>
                </RunSettings>";

            RunConfigurationSettings configurationSettings = RunConfigurationSettings.GetSettings(runSettingxml, RunConfigurationSettings.SettingsName);

            Assert.IsFalse(configurationSettings.CollectSourceInformation);
        }