@@ -166,8 +166,30 @@ public void EventExclusionPlugin_LogLevels(string source, string level, string s
166
166
}
167
167
168
168
[ Theory ]
169
- [ InlineData ( null , null , null , null , true ) ]
170
- [ InlineData ( "Test" , null , null , null , true ) ]
169
+ [ InlineData ( null , null , null , null , false ) ]
170
+ [ InlineData ( "feature" , null , null , null , false ) ]
171
+ [ InlineData ( "feature" , "test" , null , null , false ) ]
172
+ [ InlineData ( "feature" , "test" , "@@feature:Test" , "true" , false ) ]
173
+ [ InlineData ( "feature" , "test" , "@@feature:Test" , "false" , true ) ]
174
+ [ InlineData ( "feature" , "test" , "@@feature:*" , "false" , true ) ]
175
+ [ InlineData ( "404" , "/unknown" , "@@404:*" , "false" , true ) ]
176
+ [ InlineData ( "404" , "/unknown" , "@@404:/unknown" , "false" , true ) ]
177
+ [ InlineData ( "404" , "/unknown" , "@@404:/unknown" , "true" , false ) ]
178
+ public void EventExclusionPlugin_SourceType ( string type , string source , string settingKey , string settingValue , bool cancelled ) {
179
+ var client = CreateClient ( ) ;
180
+ if ( settingKey != null )
181
+ client . Configuration . Settings . Add ( settingKey , settingValue ) ;
182
+
183
+ var ev = new Event { Type = type , Source = source } ;
184
+ var context = new EventPluginContext ( client , ev ) ;
185
+ var plugin = new EventExclusionPlugin ( ) ;
186
+ plugin . Run ( context ) ;
187
+ Assert . Equal ( cancelled , context . Cancel ) ;
188
+ }
189
+
190
+ [ Theory ]
191
+ [ InlineData ( null , null , null , null , false ) ]
192
+ [ InlineData ( "Test" , null , null , null , false ) ]
171
193
[ InlineData ( "Test" , "Trace" , null , null , true ) ]
172
194
[ InlineData ( "Test" , "Warn" , null , null , false ) ]
173
195
[ InlineData ( "Test" , "Error" , SettingsDictionary . KnownKeys . LogLevelPrefix + "Test" , "Debug" , false ) ]
@@ -195,7 +217,7 @@ public void EventExclusionPlugin_LogLevelsWithInfoDefault(string source, string
195
217
[ InlineData ( "@@error:System.Exception" , true ) ]
196
218
[ InlineData ( "@@error:*Exception" , true ) ]
197
219
[ InlineData ( "@@error:*" , true ) ]
198
- public void EventExclusionPlugin_SimpleException ( string settingKey , bool cancelled ) {
220
+ public void EventExclusionPlugin_ExceptionType ( string settingKey , bool cancelled ) {
199
221
var client = CreateClient ( ) ;
200
222
if ( settingKey != null )
201
223
client . Configuration . Settings . Add ( settingKey , Boolean . FalseString ) ;
0 commit comments