public void Should_throw_when_null() { // Arrange var context = new ScannerContext(); // Act & Assert Assert.Throws <ArgumentNullException>(() => context.AddMatchOneTypeFilter(null)); Assert.Throws <ArgumentNullException>(() => context.AddMatchAllTypeFilter(null)); }
public void Should_add_match_all_filter() { // Arrange var context = new ScannerContext(); Func <Type, bool> filter = t => true; // Act context.AddMatchAllTypeFilter(filter); // Assert Assert.That(context.MatchAllTypeFilters.Single(), Is.EqualTo(filter)); Assert.That(context.MatchOneTypeFilters.Any(), Is.False); }