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"); }
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); }