This commit is contained in:
phenning 2013-02-18 15:24:08 -08:00
Родитель 9834142860
Коммит 971b17d51e
1 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -183,7 +183,8 @@ namespace Microsoft.Web.Mvc.Test
HtmlHelper htmlHelper = MvcHelper.GetHtmlHelper(GetRadioButtonListViewData(true));
// Act / Assert
Assert.Throws<InvalidOperationException>(() => htmlHelper.RadioButtonList("WrongFooList", new RouteValueDictionary(new { attr1 = "value1" })));
Assert.Throws<InvalidOperationException>(() =>
htmlHelper.RadioButtonList("WrongFooList", new RouteValueDictionary(new { attr1 = "value1" })));
}
[Fact]
@ -195,7 +196,8 @@ namespace Microsoft.Web.Mvc.Test
HtmlHelper htmlHelper = MvcHelper.GetHtmlHelper(viewData);
// Act / Assert
Assert.Throws<InvalidOperationException>(() => htmlHelper.RadioButtonList("FooList", new RouteValueDictionary(new { attr1 = "value1" })));
Assert.Throws<InvalidOperationException>(() =>
htmlHelper.RadioButtonList("FooList", new RouteValueDictionary(new { attr1 = "value1" })));
}
[Fact]
@ -206,7 +208,8 @@ namespace Microsoft.Web.Mvc.Test
SelectList selectList = GetRadioButtonListData(true);
// Act / Assert
Assert.Throws<ArgumentException>(() => htmlHelper.RadioButtonList("", selectList, new RouteValueDictionary(new { attr1 = "value1" })));
Assert.Throws<ArgumentException>(() =>
htmlHelper.RadioButtonList("", selectList, new RouteValueDictionary(new { attr1 = "value1" })));
}
[Fact]
@ -216,7 +219,8 @@ namespace Microsoft.Web.Mvc.Test
HtmlHelper htmlHelper = MvcHelper.GetHtmlHelper(GetRadioButtonListViewData(true));
// Act / Assert
Assert.Throws<ArgumentNullException>(() => htmlHelper.RadioButtonList("FooBar", null, new RouteValueDictionary(new { attr1 = "value1" })));
Assert.Throws<ArgumentNullException>(() =>
htmlHelper.RadioButtonList("FooBar", null, new RouteValueDictionary(new { attr1 = "value1" })));
}
private static SelectList GetRadioButtonListData(bool selectBaz)