public void when_creating_xpath_attribute_with_valid_values(string attributeName, string attributeValue, string expectedResult)
        {
            var result = _builder.GetAttributePart(attributeName, attributeValue);

            result.ShouldBe(expectedResult);

            _cssValidatorMock.DidNotReceiveWithAnyArgs().ValidateClassName(Arg.Any <string>());

            _xPathValidatorMock.DidNotReceiveWithAnyArgs().IsReservedFunctionName(Arg.Any <string>());
            _xPathValidatorMock.Received(1).ValidateQName(attributeName, "Attribute Name");
            _xPathValidatorMock.DidNotReceiveWithAnyArgs().ValidateNCName(Arg.Any <string>(), Arg.Any <string>());
        }
예제 #2
0
        public void when_creating_xpath_tag_with_valid_values()
        {
            var result = _builder.GetTagNamePart("valid:TagName");

            result.ShouldBe("valid:TagName");

            _xPathValidator.Received(1).ValidateQName("valid:TagName", "Tag Name");
            _xPathValidator.DidNotReceiveWithAnyArgs().ValidateNCName(Arg.Any <string>(), Arg.Any <string>());
            _xPathValidator.Received(1).IsReservedFunctionName("valid:TagName");

            _cssValidator.DidNotReceiveWithAnyArgs().ValidateClassName(Arg.Any <string>());
        }