コード例 #1
0
        public void MailToWithoutEmailThrowsArgumentNullException()
        {
            HtmlHelper html = MvcHelper.GetHtmlHelperWithPath(new ViewDataDictionary());

            ExceptionHelper.ExpectArgumentNullException(() => html.Mailto("link text", null), "emailAddress");
        }
コード例 #2
0
        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");
        }