Example #1
0
    public void Null_Value_Returns_Draft_PostStatus(object input)
    {
        // Arrange
        var handler = new PostStatusTypeHandler();

        // Act
        var result = handler.Parse(input);

        // Assert
        Assert.Same(PostStatus.Draft, result);
    }
Example #2
0
    public void Valid_Value_Returns_PostStatusType(string input, PostStatus expected)
    {
        // Arrange
        var handler = new PostStatusTypeHandler();

        // Act
        var result = handler.Parse(input);

        // Assert
        Assert.Same(expected, result);
    }
Example #3
0
    public void Invalid_Value_Returns_Draft_PostStatus()
    {
        // Arrange
        var value   = Rnd.Str;
        var handler = new PostStatusTypeHandler();

        // Act
        var result = handler.Parse(value);

        // Assert
        Assert.Same(PostStatus.Draft, result);
    }