protected override ByPropertyAliasParticleGenerator <FilterableOne> GetGenerator() { var generator = new ByPropertyAliasParticleGenerator <FilterableOne>(); generator.Add("Filterable", typeof(FilterableOne).GetProperty(nameof(FilterableOne.Filterable))); generator.Add("NonFilterable", typeof(FilterableOne).GetProperty(nameof(FilterableOne.NonFilterable))); generator.Remove("NonFilterable"); return(generator); }
public void AliasDuplicationThrows() { var generator = new ByPropertyAliasParticleGenerator <FilterableOne>(); generator.Add("Filterable", typeof(FilterableOne).GetProperty(nameof(FilterableOne.Filterable))); Assert.Throws <Exception>(() => { generator.Add("Filterable", typeof(FilterableOne).GetProperty(nameof(FilterableOne.Filterable))); }); }