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) ); }
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) ); }
/// <summary> /// Register custom post types /// </summary> public override void RegisterCustomPostTypes() => PostType.AddCustomPostType(PostTypes.Sermon);