예제 #1
0
        public void ExceptionFactory_CreateForNotMissingElement_Null()
        {
            var exception = ExceptionFactory.CreateForNotMissingElement(null);

            string expectedMessage = new SearchFailureData().ToStringForNotMissingElement();

            Assert.That(exception.Message, Is.EqualTo(expectedMessage));
        }
예제 #2
0
        public void ExceptionFactory_CreateForNotMissingElement()
        {
            SearchFailureData data = new SearchFailureData
            {
                By            = By.XPath(".//a"),
                SearchOptions = SearchOptions.Visible()
            };

            var exception = ExceptionFactory.CreateForNotMissingElement(data);

            string expectedMessage = data.ToStringForNotMissingElement();

            Assert.That(exception.Message, Is.EqualTo(expectedMessage));
        }