Skip to content

Commit b4c4824

Browse files
committed
IsSortable Tests
1 parent 6c4ab1b commit b4c4824

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed
Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1-
namespace AutSoft.Linq.Tests.Queryable.OrderByExtensions;
1+
using AutSoft.Linq.Queryable;
2+
3+
using FluentAssertions;
4+
5+
using System.Reflection;
6+
7+
namespace AutSoft.Linq.Tests.Queryable.OrderByExtensions;
28

39
public partial class IsSortable : OrderByExtensionsTests
410
{
11+
public static TheoryData<PropertyInfo?, bool> SortablePropertyTheoryData => new()
12+
{
13+
{ typeof(PersonDto).GetProperty(nameof(PersonDto.Age)), true },
14+
{ typeof(PersonDto).GetProperty(nameof(PersonDto.Address)), false },
15+
};
16+
17+
[Theory]
18+
[MemberData(nameof(SortablePropertyTheoryData))]
19+
public void Should_ReturnCorrentIncication(PropertyInfo? propertyInfo, bool expectedResult)
20+
{
21+
propertyInfo!.IsSortable().Should().Be(expectedResult);
22+
}
523
}

0 commit comments

Comments
 (0)