public void UseAssembly_Tests( [ValueSource("_useAssemblyData")]UseAssemblyData data) { // arrange var filter = new Filter(); data.Filters.ToList().ForEach(filter.AddFilter); // act var result = filter.UseAssembly(data.Assembly); // result Assert.AreEqual(data.ExpectedResult, result, "Filter: '{0}' Assembly: {1} => Expected: {2}", string.Join(",", data.Filters), data.Assembly, data.ExpectedResult); }
public void CanHandle_AssemblyFilters_ExpressedAs_RegularExpressions(string assembly, bool canUse) { // arrange var filter = new Filter(true); filter.AddFilter(@"+[(A1\.B[23])]([CD]1.*)"); // act // assert Assert.AreEqual(canUse, filter.UseAssembly("processName", assembly)); }