NotNull() static private method

static private NotNull ( object o, string message ) : void
o object
message string
return void
Example #1
0
        internal FormVariables VariablesFor(string formHtmlId)
        {
            if (formVariables == null)
            {
                ParsePageText();
            }
            FormVariables result = (FormVariables)formVariables[formHtmlId];

            WebAssert.NotNull(result, "form ID '" + formHtmlId + "' not found on current page");
            return(result);
        }
Example #2
0
        private HtmlTagTester FindTagByForm()
        {
            XmlNodeList formNodes = browser.CurrentPage.Document.GetElementsByTagName("form");

            WebAssert.True(formNodes.Count == 1, "The current page has more than one form.  To test it, construct a WebFormTester and use it as the 'container' parameter for your other testers.");
            XmlElement formElement = (XmlElement)formNodes[0];

            XmlAttribute id = formElement.Attributes["id"];

            WebAssert.NotNull(id, "couldn't find web form's 'id' attribute");

            return(new HtmlTagTester(id.Value));
        }