Ejemplo n.º 1
0
        public void TryDetermineMode_ReturnsFalseIfNoAttributeMatchesAllRequiredAttributes(string[] modeAttributes)
        {
            // Arrange
            var modeInfos = new[]
            {
                new ModeAttributes <Mode>(Mode.A, modeAttributes)
            };
            var attributes = new TagHelperAttributeList
            {
                new TagHelperAttribute("first-attr", "value"),
                new TagHelperAttribute("not-in-any-mode", "value")
            };
            var context = MakeTagHelperContext(attributes);

            // Act
            Mode result;
            var  modeMatch = AttributeMatcher.TryDetermineMode(context, modeInfos, Compare, out result);

            // Assert
            Assert.False(modeMatch);
        }