mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-19 11:41:30 +00:00
Simplify filters and make cross control slots not show by default (#782)
* Simplify filters and make cross control slots not show by default Also sort author levels by oldest levels first rather than newest levels first. * Fix unit test expecting slots to sorted by timestamp descending * Remove errant whitespace
This commit is contained in:
parent
2a85b6a136
commit
a69d94054b
20 changed files with 114 additions and 58 deletions
|
@ -208,6 +208,34 @@ public class FilterTests
|
|||
Assert.True(adventureFunc(slot));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ExcludeCrossControlFilter_ShouldAccept_WhenNotCrossControl()
|
||||
{
|
||||
ExcludeCrossControlFilter crossControlFilter = new();
|
||||
Func<SlotEntity, bool> crossControlFunc = crossControlFilter.GetPredicate().Compile();
|
||||
|
||||
SlotEntity slot = new()
|
||||
{
|
||||
CrossControllerRequired = false,
|
||||
};
|
||||
|
||||
Assert.True(crossControlFunc(slot));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ExcludeCrossControlFilter_ShouldReject_WhenCrossControl()
|
||||
{
|
||||
ExcludeCrossControlFilter crossControlFilter = new();
|
||||
Func<SlotEntity, bool> crossControlFunc = crossControlFilter.GetPredicate().Compile();
|
||||
|
||||
SlotEntity slot = new()
|
||||
{
|
||||
CrossControllerRequired = true,
|
||||
};
|
||||
|
||||
Assert.False(crossControlFunc(slot));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ExcludeLBP1OnlyFilter_ShouldReject_WhenLbp1Only_AndTokenNotLbp1_AndNotCreator()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue