public InitializeFromSettings ( IEnumerable |
||
settings | IEnumerable |
The enumerable list of |
Результат | void |
public void InitializeFromSettings_WithNullSettings_ThrowsException() { var rule = new UrlRule(); Assert.That( () => rule.InitializeFromSettings(null), Throws.Exception.TypeOf <ArgumentNullException>().With.Property("ParamName").EqualTo("settings")); }
public void InitializeFromSettings_WithNullSettings_ThrowsException() { var rule = new UrlRule(); Assert.That( () => rule.InitializeFromSettings(null), Throws.Exception.TypeOf<ArgumentNullException>().With.Property("ParamName").EqualTo("settings")); }
public void InitializeFromSettings_WithValidSettings_InitializesCorrectly(string httpMethod, string expectedHttpMethod) { var settings = new[] { new RuleSetting { Name = "url.value", Value = httpMethod } }; var rule = new UrlRule(); rule.InitializeFromSettings(settings); Assert.IsTrue(rule.IsInitialized); Assert.AreEqual(expectedHttpMethod, rule.UrlTextMatch); }
public void InitializeFromSettings_WithValidSettings_InitializesCorrectly(string httpMethod, string expectedHttpMethod) { var settings = new[] { new RuleSetting { Name = "url.value", Value = httpMethod } }; var rule = new UrlRule(); rule.InitializeFromSettings(settings); Assert.IsTrue(rule.IsInitialized); Assert.AreEqual(expectedHttpMethod, rule.UrlTextMatch); }