Inheritance: ISettingsProvider
コード例 #1
0
        public void Load_SolutionSettings_SettingsAreMerged()
        {
            var provider = new RunSettingsProvider();
            provider.Settings.Should().BeNull();

            var settingsDoc = new XmlDocument();
            settingsDoc.Load(TestResources.SolutionTestSettings);
            XPathNavigator navigator = settingsDoc.CreateNavigator();

            navigator.MoveToChild("RunSettings", "").Should().BeTrue();
            navigator.MoveToChild(GoogleTestConstants.SettingsName, "").Should().BeTrue();

            provider.Load(navigator.ReadSubtree());

            provider.Settings.Should().NotBeNull();
            provider.Settings.BatchForTestSetup.Should().Be("Solution");
        }
コード例 #2
0
        public void Load_SolutionSettings_SettingsAreMerged()
        {
            var provider = new RunSettingsProvider();

            provider.Settings.Should().BeNull();

            var settingsDoc = new XmlDocument();

            settingsDoc.Load(TestResources.SolutionTestSettings);
            XPathNavigator navigator = settingsDoc.CreateNavigator();

            navigator.MoveToChild("RunSettings", "").Should().BeTrue();
            navigator.MoveToChild(GoogleTestConstants.SettingsName, "").Should().BeTrue();

            provider.Load(navigator.ReadSubtree());

            provider.Settings.Should().NotBeNull();
            provider.Settings.BatchForTestSetup.Should().Be("Solution");
        }
コード例 #3
0
        public void Load_SolutionSettings_SettingsAreMerged()
        {
            RunSettingsProvider provider = new RunSettingsProvider();

            Assert.IsNull(provider.Settings);

            XmlDocument settingsDoc = new XmlDocument();

            settingsDoc.Load(SolutionTestSettings);
            XPathNavigator navigator = settingsDoc.CreateNavigator();

            Assert.IsTrue(navigator.MoveToChild("RunSettings", ""));
            Assert.IsTrue(navigator.MoveToChild(GoogleTestConstants.SettingsName, ""));

            provider.Load(navigator.ReadSubtree());

            Assert.IsNotNull(provider.Settings);
            Assert.AreEqual("Solution", provider.Settings.BatchForTestSetup);
        }