Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing tests for int.Seconds(TimeSpan) #2119

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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