示例#1
0
        public void GetErrorMessage()
        {
            var webElement = MockRepository.GenerateStub <IWebElement>();

            webElement.Stub(x => x.TagName).Return("input");

            var element   = new ElementForTest(webElement);
            var attribute = new NotInputAttribute();

            attribute.GetErrorMessage(element).Should().Be("Expected tag not in set of input, textarea, select, button, option. But was 'input'.");
        }
示例#2
0
        public void ValidateInCorrectElement(string tagName)
        {
            var webElement = MockRepository.GenerateStub <IWebElement>();

            webElement.Stub(x => x.TagName).Return(tagName);

            var element   = new ElementForTest(webElement);
            var attribute = new NotInputAttribute();

            attribute.Validate(element).Should().BeFalse();
        }