public void Build_DisplayNameIsName()
    {
        // Arrange
        var builder = new DefaultAllowedChildTagDescriptorBuilder(null);

        builder.Name = "foo";

        // Act
        var descriptor = builder.Build();

        // Assert
        Assert.Equal("foo", descriptor.DisplayName);
    }
Пример #2
0
    public override void AllowChildTag(Action <AllowedChildTagDescriptorBuilder> configure)
    {
        if (configure == null)
        {
            throw new ArgumentNullException(nameof(configure));
        }

        EnsureAllowedChildTags();

        var builder = new DefaultAllowedChildTagDescriptorBuilder(this);

        configure(builder);
        _allowedChildTags.Add(builder);
    }