Пример #1
0
 /// <summary>
 /// Assert that value for configuration/appSettings key matches RegEx pattern.
 /// </summary>
 /// <param name="xmlTester"><see cref="XmlTester"/>.</param>
 /// <param name="key">The appSettings key.</param>
 /// <param name="regExPattern">The RegEx pattern.</param>
 /// <exception cref="XmlTesterException">if element not found, attribute not found, or value does not match.</exception>
 public static void AssertAppSettingsValueMatch(this XmlTester xmlTester, string key, string regExPattern)
 {
     xmlTester.AssertAttributeValueMatch(ConfigXPath.AppSettingForKey(key), "value", regExPattern);
 }
Пример #2
0
        /// <summary>
        /// Assert that specified configuration/appSettings key doesn't exist.
        /// </summary>

        /// <param name="xmlTester">The <see cref="XmlTester"/></param>
        /// <param name="key">The key.</param>
        /// <exception cref="XmlTesterException">if key is found.</exception>
        public static void AssertAppSettingsKeyDoesNotExist(this XmlTester xmlTester, string key)
        {
            xmlTester.AssertElementDoesNotExist(ConfigXPath.AppSettingForKey(key));
        }
Пример #3
0
 /// <summary>
 /// Assert expected value for configuration/appSettings key.
 /// </summary>
 /// <param name="xmlTester"><see cref="XmlTester"/>.</param>
 /// <param name="key">The appSettings key.</param>
 /// <param name="expectedValue">The expected value.</param>
 /// <exception cref="XmlTesterException">if element not found, attribute not found, or value does not match.</exception>
 public static void AssertAppSettingsValue(this XmlTester xmlTester, string key, string expectedValue)
 {
     xmlTester.AssertAttributeValue(ConfigXPath.AppSettingForKey(key), "value", expectedValue);
 }
Пример #4
0
 /// <summary>
 /// Get <see cref="XElement"/> for "appSettings" key.
 /// </summary>
 /// <param name="xmlTester"><see cref="XmlTester"/>.</param>
 /// <param name="key">The key.</param>
 /// <returns>The <see cref="XElement"/>.</returns>
 public static XElement GetAppSettingsElement(this XmlTester xmlTester, string key)
 {
     return(xmlTester.AssertElementExists(ConfigXPath.AppSettingForKey(key)));
 }