Пример #1
0
    public void Null_Value_Returns_Blank_CommentType(object input)
    {
        // Arrange
        var handler = new CommentTypeTypeHandler();

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

        // Assert
        Assert.Same(CommentType.Blank, result);
    }
Пример #2
0
    public void Valid_Value_Returns_CommentType(string input, CommentType expected)
    {
        // Arrange
        var handler = new CommentTypeTypeHandler();

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

        // Assert
        Assert.Same(expected, result);
    }
Пример #3
0
    public void Sets_Value_To_CommentType_Name(string expected, CommentType input)
    {
        // Arrange
        var handler   = new CommentTypeTypeHandler();
        var parameter = Substitute.For <IDbDataParameter>();

        // Act
        handler.SetValue(parameter, input);

        // Assert
        parameter.Received().Value = expected;
    }
Пример #4
0
    public void Invalid_Value_Returns_Blank_CommentType()
    {
        // Arrange
        var value   = Rnd.Str;
        var handler = new CommentTypeTypeHandler();

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

        // Assert
        Assert.Same(CommentType.Blank, result);
    }