public void Clear_RemovesAllAttributes()
    {
        // Arrange
        var attributes = new TagHelperAttributeList(
            new[]
        {
            new TagHelperAttribute("a", "av"),
            new TagHelperAttribute("b", "bv"),
        });

        // Act
        attributes.Clear();

        // Assert
        Assert.Empty(attributes);
    }
        public void Clear_RemovesAllAttributes()
        {
            // Arrange
            var attributes = new TagHelperAttributeList(
                new[]
                {
                    new TagHelperAttribute("a", "av"),
                    new TagHelperAttribute("b", "bv"),
                });

            // Act
            attributes.Clear();

            // Assert
            Assert.Empty(attributes);
        }
示例#3
0
 /// <summary>
 /// Clears the <see cref="TagHelperContext"/> and updates its state with the provided values.
 /// </summary>
 /// <param name="items">The <see cref="IDictionary{Object, Object}"/> to use.</param>
 /// <param name="uniqueId">The unique id to use.</param>
 public void Reinitialize(IDictionary <object, object> items, string uniqueId)
 {
     _allAttributes.Clear();
     Items    = items;
     UniqueId = uniqueId;
 }