Headless.UnitTests.HtmlElementFinderTests.ByPredicateThrowsExceptionWithNullPredicateTest C# (CSharp) Method

ByPredicateThrowsExceptionWithNullPredicateTest() private method

private ByPredicateThrowsExceptionWithNullPredicateTest ( ) : void
return void
        public void ByPredicateThrowsExceptionWithNullPredicateTest()
        {
            const string Html = @"
            <html>
            <head />
            <body>
            <form name='Test'>
            <input type='text' id='DataId' name='Data' />
            </form>
            <form name='SecondTest'>
            <input type='checkbox' name='IsSet' />
            </form>
            </body>
            </html>
            ";

            var page = new HtmlPageStub(Html);

            Action action = () => page.Find<HtmlForm>().ByPredicate(null);

            action.ShouldThrow<ArgumentNullException>();
        }
HtmlElementFinderTests