public void AddObject_WithUnderscorePropertyName_ThenDashPropertyName() { var target = new HtmlAttributeDictionary(); target.Add(new { data_value = "test" }); target.Where(k => k.Key == "data-value").Select(k => k.Key).FirstOrDefault().ShouldEqual("data-value"); }
public void AddNameValuePair_WithUnderscorePropertyName_ThenRemainsUnderscoreName() { var target = new HtmlAttributeDictionary(); target.Add("data_value", "test"); target.Where(k => k.Key == "data_value").Select(k => k.Key).FirstOrDefault().ShouldEqual("data_value"); }
public void WithUpperPropertyName_ThenLowerName() { var target = new HtmlAttributeDictionary(); target.Add(new { ASYNC = "async" }); target.Where(k => k.Key == "async").Select(k => k.Key).FirstOrDefault().ShouldEqual("async"); }