Пример #1
0
        public void MailToWithoutEmailThrowsArgumentNullException()
        {
            HtmlHelper html = MvcHelper.GetHtmlHelperWithPath(new ViewDataDictionary());

            ExceptionHelper.ExpectArgumentNullException(() => html.Mailto("link text", null), "emailAddress");
        }
        public void MailToWithoutLinkTextThrowsArgumentNullException()
        {
            HtmlHelper html = MvcHelper.GetHtmlHelperWithPath(new ViewDataDictionary());

            Assert.ThrowsArgumentNull(() => html.Mailto(null, "*****@*****.**"), "linkText");
        }
Пример #3
0
        public void RenderRouteWithNullRouteValueDictionaryThrowsException()
        {
            HtmlHelper html = MvcHelper.GetHtmlHelperWithPath(new ViewDataDictionary(), "/");

            ExceptionHelper.ExpectArgumentNullException(() => html.RenderRoute(null), "routeValues");
        }
Пример #4
0
        public void ImageWithEmptyRelativeUrlThrowsArgumentNullException()
        {
            HtmlHelper html = MvcHelper.GetHtmlHelperWithPath(new ViewDataDictionary());

            ExceptionHelper.ExpectArgumentExceptionNullOrEmpty(() => html.Image(null), "imageRelativeUrl");
        }