mirror of
https://github.com/Biarity/Sieve.git
synced 2025-09-19 06:39:43 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
863d75bdc1 | ||
|
820358e8ff |
72
README.md
72
README.md
@@ -159,7 +159,10 @@ More formally:
|
||||
* `pageSize` is the number of items returned per page
|
||||
|
||||
Notes:
|
||||
* You can use backslashes to escape commas and pipes within value fields
|
||||
* You can use backslashes to escape special characters and sequences:
|
||||
* commas: `Title@=some\,title` makes a match with "some,title"
|
||||
* pipes: `Title@=some\|title` makes a match with "some|title"
|
||||
* null values: `Title@=\null` will search for items with title equal to "null" (not a missing value, but "null"-string literally)
|
||||
* You can have spaces anywhere except *within* `{Name}` or `{Operator}` fields
|
||||
* If you need to look at the data before applying pagination (eg. get total count), use the optional paramters on `Apply` to defer pagination (an [example](https://github.com/Biarity/Sieve/issues/34))
|
||||
* Here's a [good example on how to work with enumerables](https://github.com/Biarity/Sieve/issues/2)
|
||||
@@ -260,13 +263,78 @@ public class ApplicationSieveProcessor : SieveProcessor
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
Now you should inject the new class instead:
|
||||
```C#
|
||||
services.AddScoped<ISieveProcessor, ApplicationSieveProcessor>();
|
||||
```
|
||||
|
||||
Find More on Sieve's Fluent API [here](https://github.com/Biarity/Sieve/issues/4#issuecomment-364629048).
|
||||
|
||||
### Modular Fluent API configuration
|
||||
Adding all fluent mappings directly in the processor can become unwieldy on larger projects.
|
||||
It can also clash with vertical architectures.
|
||||
To enable functional grouping of mappings the `ISieveConfiguration` interface was created together with extensions to the default mapper.
|
||||
```C#
|
||||
public class SieveConfigurationForPost : ISieveConfiguration
|
||||
{
|
||||
protected override SievePropertyMapper Configure(SievePropertyMapper mapper)
|
||||
{
|
||||
mapper.Property<Post>(p => p.Title)
|
||||
.CanFilter()
|
||||
.HasName("a_different_query_name_here");
|
||||
|
||||
mapper.Property<Post>(p => p.CommentCount)
|
||||
.CanSort();
|
||||
|
||||
mapper.Property<Post>(p => p.DateCreated)
|
||||
.CanSort()
|
||||
.CanFilter()
|
||||
.HasName("created_on");
|
||||
|
||||
return mapper;
|
||||
}
|
||||
}
|
||||
```
|
||||
With the processor simplified to:
|
||||
```C#
|
||||
public class ApplicationSieveProcessor : SieveProcessor
|
||||
{
|
||||
public ApplicationSieveProcessor(
|
||||
IOptions<SieveOptions> options,
|
||||
ISieveCustomSortMethods customSortMethods,
|
||||
ISieveCustomFilterMethods customFilterMethods)
|
||||
: base(options, customSortMethods, customFilterMethods)
|
||||
{
|
||||
}
|
||||
|
||||
protected override SievePropertyMapper MapProperties(SievePropertyMapper mapper)
|
||||
{
|
||||
return mapper
|
||||
.ApplyConfiguration<SieveConfigurationForPost>()
|
||||
.ApplyConfiguration<SieveConfigurationForComment>();
|
||||
}
|
||||
}
|
||||
```
|
||||
There is also the option to scan and add all configurations for a given assembly
|
||||
```C#
|
||||
public class ApplicationSieveProcessor : SieveProcessor
|
||||
{
|
||||
public ApplicationSieveProcessor(
|
||||
IOptions<SieveOptions> options,
|
||||
ISieveCustomSortMethods customSortMethods,
|
||||
ISieveCustomFilterMethods customFilterMethods)
|
||||
: base(options, customSortMethods, customFilterMethods)
|
||||
{
|
||||
}
|
||||
|
||||
protected override SievePropertyMapper MapProperties(SievePropertyMapper mapper)
|
||||
{
|
||||
return mapper.ApplyConfigurationForAssembly(typeof(ApplicationSieveProcessor).Assembly);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Upgrading to v2.2.0
|
||||
|
||||
2.2.0 introduced OR logic for filter values. This means your custom filters will need to accept multiple values rather than just the one.
|
||||
|
15
Sieve.Sample/Entities/SieveConfigurationForPost.cs
Normal file
15
Sieve.Sample/Entities/SieveConfigurationForPost.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Sieve.Services;
|
||||
|
||||
namespace Sieve.Sample.Entities
|
||||
{
|
||||
public class SieveConfigurationForPost : ISieveConfiguration
|
||||
{
|
||||
public void Configure(SievePropertyMapper mapper)
|
||||
{
|
||||
mapper.Property<Post>(p => p.Title)
|
||||
.CanSort()
|
||||
.CanFilter()
|
||||
.HasName("CustomTitleName");
|
||||
}
|
||||
}
|
||||
}
|
@@ -13,11 +13,18 @@ namespace Sieve.Sample.Services
|
||||
|
||||
protected override SievePropertyMapper MapProperties(SievePropertyMapper mapper)
|
||||
{
|
||||
// Option 1: Map all properties centrally
|
||||
mapper.Property<Post>(p => p.Title)
|
||||
.CanSort()
|
||||
.CanFilter()
|
||||
.HasName("CustomTitleName");
|
||||
|
||||
// Option 2: Manually apply functionally grouped mapping configurations
|
||||
//mapper.ApplyConfiguration<SieveConfigurationForPost>();
|
||||
|
||||
// Option 3: Scan and apply all configurations
|
||||
//mapper.ApplyConfigurationsFromAssembly(typeof(ApplicationSieveProcessor).Assembly);
|
||||
|
||||
return mapper;
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
@@ -7,12 +8,16 @@ namespace Sieve.Models
|
||||
public class FilterTerm : IFilterTerm, IEquatable<FilterTerm>
|
||||
{
|
||||
private const string EscapedPipePattern = @"(?<!($|[^\\]|^)(\\\\)*?\\)\|";
|
||||
private const string PipeToEscape = @"\|";
|
||||
private const string BackslashToEscape = @"\\";
|
||||
private const string OperatorsRegEx = @"(!@=\*|!_=\*|!=\*|!@=|!_=|==\*|@=\*|_=\*|==|!=|>=|<=|>|<|@=|_=)";
|
||||
private const string EscapeNegPatternForOper = @"(?<!\\)" + OperatorsRegEx;
|
||||
private const string EscapePosPatternForOper = @"(?<=\\)" + OperatorsRegEx;
|
||||
|
||||
private static readonly HashSet<string> _escapedSequences = new HashSet<string>
|
||||
{
|
||||
@"\|",
|
||||
@"\\"
|
||||
};
|
||||
|
||||
public string Filter
|
||||
{
|
||||
set
|
||||
@@ -30,8 +35,7 @@ namespace Sieve.Models
|
||||
}
|
||||
|
||||
Values = Regex.Split(filterSplits[2], EscapedPipePattern)
|
||||
.Select(t => t.Replace(PipeToEscape, "|").Trim())
|
||||
.Select(t => t.Replace(BackslashToEscape, "\\").Trim())
|
||||
.Select(UnEscape)
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
@@ -40,9 +44,12 @@ namespace Sieve.Models
|
||||
OperatorIsCaseInsensitive = Operator.EndsWith("*");
|
||||
OperatorIsNegated = OperatorParsed != FilterOperator.NotEquals && Operator.StartsWith("!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private string UnEscape(string escapedTerm)
|
||||
=> _escapedSequences.Aggregate(escapedTerm,
|
||||
(current, sequence) => Regex.Replace(current, $@"(\\)({sequence})", "$2"));
|
||||
|
||||
public string[] Names { get; private set; }
|
||||
|
||||
public FilterOperator OperatorParsed { get; private set; }
|
||||
|
70
Sieve/Services/ISieveConfiguration.cs
Normal file
70
Sieve/Services/ISieveConfiguration.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Sieve.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Use this interface to create SieveConfiguration (just like EntityTypeConfigurations are defined for EF)
|
||||
/// </summary>
|
||||
public interface ISieveConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Configures sieve property mappings.
|
||||
/// </summary>
|
||||
/// <param name="mapper"> The mapper used to configure the sieve properties on. </param>
|
||||
void Configure(SievePropertyMapper mapper);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configuration extensions to the <see cref="SievePropertyMapper" />
|
||||
/// </summary>
|
||||
public static class SieveConfigurationExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Applies configuration that is defined in an <see cref="ISieveConfiguration" /> instance.
|
||||
/// </summary>
|
||||
/// <param name="mapper"> The mapper to apply the configuration on. </param>
|
||||
/// <typeparam name="T">The configuration to be applied. </typeparam>
|
||||
/// <returns>
|
||||
/// The same <see cref="SievePropertyMapper" /> instance so that additional configuration calls can be chained.
|
||||
/// </returns>
|
||||
public static SievePropertyMapper ApplyConfiguration<T>(this SievePropertyMapper mapper) where T : ISieveConfiguration, new()
|
||||
{
|
||||
var configuration = new T();
|
||||
configuration.Configure(mapper);
|
||||
return mapper;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies configuration from all <see cref="ISieveConfiguration" />
|
||||
/// instances that are defined in provided assembly.
|
||||
/// </summary>
|
||||
/// <param name="mapper"> The mapper to apply the configuration on. </param>
|
||||
/// <param name="assembly"> The assembly to scan. </param>
|
||||
/// <returns>
|
||||
/// The same <see cref="SievePropertyMapper" /> instance so that additional configuration calls can be chained.
|
||||
/// </returns>
|
||||
public static SievePropertyMapper ApplyConfigurationsFromAssembly(this SievePropertyMapper mapper, Assembly assembly)
|
||||
{
|
||||
foreach (var type in assembly.GetTypes().Where(t => !t.IsAbstract && !t.IsGenericTypeDefinition))
|
||||
{
|
||||
// Only accept types that contain a parameterless constructor, are not abstract.
|
||||
var noArgConstructor = type.GetConstructor(Type.EmptyTypes);
|
||||
if (noArgConstructor is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (type.GetInterfaces().Any(t => t == typeof(ISieveConfiguration)))
|
||||
{
|
||||
var configuration = (ISieveConfiguration)noArgConstructor.Invoke(new object?[] { });
|
||||
configuration.Configure(mapper);
|
||||
}
|
||||
}
|
||||
|
||||
return mapper;
|
||||
}
|
||||
}
|
||||
}
|
@@ -68,6 +68,7 @@ namespace Sieve.Services
|
||||
where TSortTerm : ISortTerm, new()
|
||||
{
|
||||
private const string NullFilterValue = "null";
|
||||
private const char EscapeChar = '\\';
|
||||
private readonly ISieveCustomSortMethods _customSortMethods;
|
||||
private readonly ISieveCustomFilterMethods _customFilterMethods;
|
||||
private readonly SievePropertyMapper _mapper = new SievePropertyMapper();
|
||||
@@ -199,7 +200,7 @@ namespace Sieve.Services
|
||||
? Expression.Constant(null, property.PropertyType)
|
||||
: ConvertStringValueToConstantExpression(filterTermValue, property, converter);
|
||||
|
||||
if (filterTerm.OperatorIsCaseInsensitive)
|
||||
if (filterTerm.OperatorIsCaseInsensitive && !isFilterTermValueNull)
|
||||
{
|
||||
propertyValue = Expression.Call(propertyValue,
|
||||
typeof(string).GetMethods()
|
||||
@@ -311,6 +312,10 @@ namespace Sieve.Services
|
||||
private static Expression ConvertStringValueToConstantExpression(string value, PropertyInfo property,
|
||||
TypeConverter converter)
|
||||
{
|
||||
// to allow user to distinguish between prop==null (as null) and prop==\null (as "null"-string)
|
||||
value = value.Equals(EscapeChar + NullFilterValue, StringComparison.InvariantCultureIgnoreCase)
|
||||
? value.TrimStart(EscapeChar)
|
||||
: value;
|
||||
dynamic constantVal = converter.CanConvertFrom(typeof(string))
|
||||
? converter.ConvertFrom(value)
|
||||
: Convert.ChangeType(value, property.PropertyType);
|
||||
|
@@ -0,0 +1,37 @@
|
||||
using Sieve.Services;
|
||||
|
||||
namespace SieveUnitTests.Abstractions.Entity
|
||||
{
|
||||
public class SieveConfigurationForIPost : ISieveConfiguration
|
||||
{
|
||||
public void Configure(SievePropertyMapper mapper)
|
||||
{
|
||||
mapper.Property<IPost>(p => p.ThisHasNoAttributeButIsAccessible)
|
||||
.CanSort()
|
||||
.CanFilter()
|
||||
.HasName("shortname");
|
||||
|
||||
mapper.Property<IPost>(p => p.TopComment.Text)
|
||||
.CanFilter();
|
||||
|
||||
mapper.Property<IPost>(p => p.TopComment.Id)
|
||||
.CanSort();
|
||||
|
||||
mapper.Property<IPost>(p => p.OnlySortableViaFluentApi)
|
||||
.CanSort();
|
||||
|
||||
mapper.Property<IPost>(p => p.TopComment.Text)
|
||||
.CanFilter()
|
||||
.HasName("topc");
|
||||
|
||||
mapper.Property<IPost>(p => p.FeaturedComment.Text)
|
||||
.CanFilter()
|
||||
.HasName("featc");
|
||||
|
||||
mapper
|
||||
.Property<IPost>(p => p.DateCreated)
|
||||
.CanSort()
|
||||
.HasName("CreateDate");
|
||||
}
|
||||
}
|
||||
}
|
37
SieveUnitTests/Entities/SieveConfigurationForPost.cs
Normal file
37
SieveUnitTests/Entities/SieveConfigurationForPost.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Sieve.Services;
|
||||
|
||||
namespace SieveUnitTests.Entities
|
||||
{
|
||||
public class SieveConfigurationForPost : ISieveConfiguration
|
||||
{
|
||||
public void Configure(SievePropertyMapper mapper)
|
||||
{
|
||||
mapper.Property<Post>(p => p.ThisHasNoAttributeButIsAccessible)
|
||||
.CanSort()
|
||||
.CanFilter()
|
||||
.HasName("shortname");
|
||||
|
||||
mapper.Property<Post>(p => p.TopComment.Text)
|
||||
.CanFilter();
|
||||
|
||||
mapper.Property<Post>(p => p.TopComment.Id)
|
||||
.CanSort();
|
||||
|
||||
mapper.Property<Post>(p => p.OnlySortableViaFluentApi)
|
||||
.CanSort();
|
||||
|
||||
mapper.Property<Post>(p => p.TopComment.Text)
|
||||
.CanFilter()
|
||||
.HasName("topc");
|
||||
|
||||
mapper.Property<Post>(p => p.FeaturedComment.Text)
|
||||
.CanFilter()
|
||||
.HasName("featc");
|
||||
|
||||
mapper
|
||||
.Property<Post>(p => p.DateCreated)
|
||||
.CanSort()
|
||||
.HasName("CreateDate");
|
||||
}
|
||||
}
|
||||
}
|
@@ -2,6 +2,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Sieve.Exceptions;
|
||||
using Sieve.Models;
|
||||
using Sieve.Services;
|
||||
using SieveUnitTests.Entities;
|
||||
using SieveUnitTests.Services;
|
||||
using Xunit;
|
||||
@@ -10,15 +11,10 @@ namespace SieveUnitTests
|
||||
{
|
||||
public class Mapper
|
||||
{
|
||||
private readonly ApplicationSieveProcessor _processor;
|
||||
private readonly IQueryable<Post> _posts;
|
||||
|
||||
public Mapper()
|
||||
{
|
||||
_processor = new ApplicationSieveProcessor(new SieveOptionsAccessor(),
|
||||
new SieveCustomSortMethods(),
|
||||
new SieveCustomFilterMethods());
|
||||
|
||||
_posts = new List<Post>
|
||||
{
|
||||
new Post
|
||||
@@ -45,23 +41,49 @@ namespace SieveUnitTests
|
||||
}.AsQueryable();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MapperWorks()
|
||||
/// <summary>
|
||||
/// Processors with the same mappings but configured via a different method.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<object[]> GetProcessors()
|
||||
{
|
||||
yield return new object[] {
|
||||
new ApplicationSieveProcessor(
|
||||
new SieveOptionsAccessor(),
|
||||
new SieveCustomSortMethods(),
|
||||
new SieveCustomFilterMethods())};
|
||||
yield return new object[] {
|
||||
new ModularConfigurationSieveProcessor(
|
||||
new SieveOptionsAccessor(),
|
||||
new SieveCustomSortMethods(),
|
||||
new SieveCustomFilterMethods())};
|
||||
yield return new object[] {
|
||||
new ModularConfigurationWithScanSieveProcessor(
|
||||
new SieveOptionsAccessor(),
|
||||
new SieveCustomSortMethods(),
|
||||
new SieveCustomFilterMethods())};
|
||||
}
|
||||
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(GetProcessors))]
|
||||
public void MapperWorks(ISieveProcessor processor)
|
||||
{
|
||||
var model = new SieveModel
|
||||
{
|
||||
Filters = "shortname@=A",
|
||||
};
|
||||
|
||||
var result = _processor.Apply(model, _posts);
|
||||
var result = processor.Apply(model, _posts);
|
||||
|
||||
Assert.Equal("A", result.First().ThisHasNoAttributeButIsAccessible);
|
||||
|
||||
Assert.True(result.Count() == 1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MapperSortOnlyWorks()
|
||||
[Theory]
|
||||
[MemberData(nameof(GetProcessors))]
|
||||
public void MapperSortOnlyWorks(ISieveProcessor processor)
|
||||
{
|
||||
var model = new SieveModel
|
||||
{
|
||||
@@ -69,9 +91,9 @@ namespace SieveUnitTests
|
||||
Sorts = "OnlySortableViaFluentApi"
|
||||
};
|
||||
|
||||
var result = _processor.Apply(model, _posts, applyFiltering: false, applyPagination: false);
|
||||
var result = processor.Apply(model, _posts, applyFiltering: false, applyPagination: false);
|
||||
|
||||
Assert.Throws<SieveMethodNotFoundException>(() => _processor.Apply(model, _posts));
|
||||
Assert.Throws<SieveMethodNotFoundException>(() => processor.Apply(model, _posts));
|
||||
|
||||
Assert.Equal(3, result.First().Id);
|
||||
|
||||
|
@@ -0,0 +1,26 @@
|
||||
using Microsoft.Extensions.Options;
|
||||
using Sieve.Models;
|
||||
using Sieve.Services;
|
||||
using SieveUnitTests.Abstractions.Entity;
|
||||
using SieveUnitTests.Entities;
|
||||
|
||||
namespace SieveUnitTests.Services
|
||||
{
|
||||
public class ModularConfigurationSieveProcessor : SieveProcessor
|
||||
{
|
||||
public ModularConfigurationSieveProcessor(
|
||||
IOptions<SieveOptions> options,
|
||||
ISieveCustomSortMethods customSortMethods,
|
||||
ISieveCustomFilterMethods customFilterMethods)
|
||||
: base(options, customSortMethods, customFilterMethods)
|
||||
{
|
||||
}
|
||||
|
||||
protected override SievePropertyMapper MapProperties(SievePropertyMapper mapper)
|
||||
{
|
||||
return mapper
|
||||
.ApplyConfiguration<SieveConfigurationForPost>()
|
||||
.ApplyConfiguration<SieveConfigurationForIPost>();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
using Microsoft.Extensions.Options;
|
||||
using Sieve.Models;
|
||||
using Sieve.Services;
|
||||
|
||||
namespace SieveUnitTests.Services
|
||||
{
|
||||
public class ModularConfigurationWithScanSieveProcessor : SieveProcessor
|
||||
{
|
||||
public ModularConfigurationWithScanSieveProcessor(
|
||||
IOptions<SieveOptions> options,
|
||||
ISieveCustomSortMethods customSortMethods,
|
||||
ISieveCustomFilterMethods customFilterMethods)
|
||||
: base(options, customSortMethods, customFilterMethods)
|
||||
{
|
||||
}
|
||||
|
||||
protected override SievePropertyMapper MapProperties(SievePropertyMapper mapper) =>
|
||||
mapper.ApplyConfigurationsFromAssembly(typeof(ModularConfigurationWithScanSieveProcessor).Assembly);
|
||||
}
|
||||
}
|
@@ -38,7 +38,7 @@ namespace SieveUnitTests
|
||||
{
|
||||
Id = 2,
|
||||
DateCreated = DateTimeOffset.UtcNow,
|
||||
Text = "Regular comment without n*ll.",
|
||||
Text = "Regular comment without n*ll",
|
||||
Author = "Mouse",
|
||||
},
|
||||
new Comment
|
||||
@@ -47,24 +47,28 @@ namespace SieveUnitTests
|
||||
DateCreated = DateTimeOffset.UtcNow,
|
||||
Text = null,
|
||||
Author = "null",
|
||||
},
|
||||
}
|
||||
}.AsQueryable();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Filter_Equals_Null()
|
||||
[Theory]
|
||||
[InlineData("Text==null")]
|
||||
[InlineData("Text==*null")]
|
||||
public void Filter_Equals_Null(string filter)
|
||||
{
|
||||
var model = new SieveModel {Filters = "Text==null"};
|
||||
var model = new SieveModel {Filters = filter};
|
||||
|
||||
var result = _processor.Apply(model, _comments);
|
||||
|
||||
Assert.Equal(100, result.Single().Id);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Filter_NotEquals_Null()
|
||||
[Theory]
|
||||
[InlineData("Text!=null")]
|
||||
[InlineData("Text!=*null")]
|
||||
public void Filter_NotEquals_Null(string filter)
|
||||
{
|
||||
var model = new SieveModel {Filters = "Text!=null"};
|
||||
var model = new SieveModel {Filters = filter};
|
||||
|
||||
var result = _processor.Apply(model, _comments);
|
||||
|
||||
@@ -101,6 +105,22 @@ namespace SieveUnitTests
|
||||
Assert.Equal(expectedIds, result.Select(p => p.Id));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(@"Author==\null", 100)]
|
||||
[InlineData(@"Author==*\null", 100)]
|
||||
[InlineData(@"Author==*\NuLl", 100)]
|
||||
[InlineData(@"Author!=*\null", 0, 1, 2)]
|
||||
[InlineData(@"Author!=*\NulL", 0, 1, 2)]
|
||||
[InlineData(@"Author!=\null", 0, 1, 2)]
|
||||
public void SingleFilter_Equals_NullStringEscaped(string filter, params int[] expectedIds)
|
||||
{
|
||||
var model = new SieveModel {Filters = filter};
|
||||
|
||||
var result = _processor.Apply(model, _comments);
|
||||
|
||||
Assert.Equal(expectedIds, result.Select(p => p.Id));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("Text_=null")]
|
||||
[InlineData("Text_=*null")]
|
||||
|
Reference in New Issue
Block a user