Beispiel #1
0
    public void Valid_Returns_Long_Value()
    {
        // Arrange
        const long expected = 200001020304;
        var        input    = new DateTimeInt(expected);

        // Act
        var result = input.ToLong();

        // Assert
        Assert.Equal(expected, result);
    }
Beispiel #2
0
#pragma warning disable xUnit1026 // Theory methods should use all of their parameters
    public void Invalid_Returns_Zero(int year, int month, int day, int hour, int minute, string _)
#pragma warning restore xUnit1026 // Theory methods should use all of their parameters
    {
        // Arrange
        var input = new DateTimeInt(year, month, day, hour, minute);

        // Act
        var result = input.ToLong();

        // Assert
        Assert.Equal(0, result);
    }