public void ExceptionFactory_CreateForNotMissingElement_Null() { var exception = ExceptionFactory.CreateForNotMissingElement(null); string expectedMessage = new SearchFailureData().ToStringForNotMissingElement(); Assert.That(exception.Message, Is.EqualTo(expectedMessage)); }
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)); }