Skip to content

Commit

Permalink
Add missing tests for int.Seconds(TimeSpan) in `FluentTimeSpanExten…
Browse files Browse the repository at this point in the history
…sions`
  • Loading branch information
IT-VBFK committed Jan 22, 2023
1 parent 158f801 commit dca3f76
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,26 @@ public void When_getting_the_number_of_seconds_from_a_double_it_should_return_th
time.Should().Be(TimeSpan.FromSeconds(4.5));
}

[Fact]
public void Add_time_span_to_given_seconds()
{
// Act
TimeSpan time = 4.Seconds(TimeSpan.FromSeconds(1));

// Assert
time.Should().Be(TimeSpan.FromSeconds(5));
}

[Fact]
public void Subtract_time_span_from_given_seconds()
{
// Act
TimeSpan time = 4.Seconds(TimeSpan.FromSeconds(-1));

// Assert
time.Should().Be(TimeSpan.FromSeconds(3));
}

[Fact]
public void When_getting_the_nanoseconds_component_it_should_return_the_correct_value()
{
Expand Down

0 comments on commit dca3f76

Please sign in to comment.