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(); }