teamlead-dashboard/tests/TUI.Engine.Tests/Primitives/IntegerTests.cs

28 lines
638 B
C#
Raw Permalink Normal View History

2024-03-15 19:13:09 +00:00
using FluentAssertions;
2024-03-17 19:57:31 +00:00
namespace TUI.Engine.Tests.Primitives;
2024-03-15 19:13:09 +00:00
public class IntegerTests
{
[Theory]
2024-03-16 19:39:58 +00:00
[Trait("Category", "Primitives")]
2024-03-15 19:13:09 +00:00
[InlineData(5, 10, 5)]
[InlineData(5, 5, 5)]
[InlineData(5, 3, 3)]
public void Max(int value, int max, int expected)
{
var result = value.Max(max);
result.Should().Be(expected);
}
[Theory]
2024-03-16 19:39:58 +00:00
[Trait("Category", "Primitives")]
2024-03-15 19:13:09 +00:00
[InlineData(5, 10, 10)]
[InlineData(5, 5, 5)]
[InlineData(5, 3, 5)]
public void Min(int value, int min, int expected)
{
var result = value.Min(min);
result.Should().Be(expected);
}
}