Пример #1
0
        public void Should_add_match_one_filter()
        {
            // Arrange
            var context = new ScannerContext();
            Func<string, bool> filter = t => true;

            // Act
            context.AddMatchOneFileFilter(filter);

            // Assert
            Assert.That(context.MatchOneFileFilters.Single(), Is.EqualTo(filter));
            Assert.That(context.MatchAllFileFilters.Any(), Is.False);
        }
Пример #2
0
        public void Should_throw_when_null()
        {
            // Arrange
            var context = new ScannerContext();

            // Act & Assert
            Assert.Throws<ArgumentNullException>(() => context.AddMatchOneFileFilter(null));
            Assert.Throws<ArgumentNullException>(() => context.AddMatchAllFileFilter(null));
        }