Exemple #1
0
        public void Should_throw_when_null()
        {
            // Arrange
            var context = new ScannerContext();

            // Act & Assert
            Assert.Throws <ArgumentNullException>(() => context.AddFilter(null));
        }
Exemple #2
0
        public void Should_add_filter()
        {
            // Arrange
            var context = new ScannerContext();
            Func <Type, bool> filter = t => true;

            // Act
            context.AddFilter(filter);

            // Assert
            Assert.That(context.Filters.Single(), Is.EqualTo(filter));
        }