public void 加入空的副檔名排除條件_應該拋出例外() { Assert.Throws <InvalidFileExtensionFilterException>(() => { var filter = new SearchFilter(); filter.ExcludeExtension(string.Empty); }); }
public void 副檔名條件先加入接受條件再加入排除條件_符合條件的副檔名應該不被接受() { // Arrange var filter = new SearchFilter(); filter.IncludeExtension(".exe"); filter.ExcludeExtension(".exe"); // Act var result = filter.Match(new[] { "file.exe" }); // Assert Assert.That(result, Is.Empty); }