Exemplo n.º 1
0
    public void Adds_Custom_PostType_To_HashSet()
    {
        // Arrange
        var name = Rnd.Str;
        var type = new PostType(name);

        // Act
        var result = PostType.AddCustomPostType(type);

        // Assert
        Assert.True(result);
        Assert.Contains(PostType.AllTest(),
                        x => x.Equals(type)
                        );
    }
Exemplo n.º 2
0
    public void Does_Not_Add_Custom_PostType_Twice()
    {
        // Arrange
        var name = Rnd.Str;
        var type = new PostType(name);

        PostType.AddCustomPostType(type);

        // Act
        var result = PostType.AddCustomPostType(type);

        // Assert
        Assert.False(result);
        Assert.Contains(PostType.AllTest(),
                        x => x.Equals(type)
                        );
    }
Exemplo n.º 3
0
 /// <summary>
 /// Register custom post types
 /// </summary>
 public override void RegisterCustomPostTypes() =>
 PostType.AddCustomPostType(PostTypes.Sermon);