public void ExcudeMethodWithNoType(
            Type type,
            Mock <MethodBase> methodMock,
            IEnumerable <RegexRule> otherRules,
            RegexFilter sut)
        {
            // Arrange
            methodMock.SetupGet(m => m.Name).Returns("Name" + Guid.NewGuid());
            sut.Rules.AddRange(otherRules);
            sut.ExcludeMethod(methodMock.Object.Name);

            // Act
            bool actual = ((IMethodFilter)sut).ExcludeMethod(type, methodMock.Object);

            // Assert
            Assert.True(actual);
        }
        public void EnsureIncludeMethodTakesPrecedenceOverExcudeMethod(
            Type type,
            Mock <MethodBase> methodMock,
            IEnumerable <RegexRule> otherRules,
            RegexFilter sut)
        {
            // Arrange
            methodMock.SetupGet(m => m.Name).Returns("Name" + Guid.NewGuid());
            sut.Rules.AddRange(otherRules);
            sut.ExcludeMethod(methodMock.Object.Name, type)
            .IncludeMethod(methodMock.Object.Name);

            // Act
            bool actual = ((IMethodFilter)sut).ExcludeMethod(type, methodMock.Object);

            // Assert
            Assert.False(actual);
        }
        public void EnsureIncludeMethodTakesPrecedenceOverExcudeMethod(
            Type type,
            Mock<MethodBase> methodMock,
            IEnumerable<RegexRule> otherRules,
            RegexFilter sut)
        {
            // Arrange
            methodMock.SetupGet(m => m.Name).Returns("Name" + Guid.NewGuid());
            sut.Rules.AddRange(otherRules);
            sut.ExcludeMethod(methodMock.Object.Name, type)
               .IncludeMethod(methodMock.Object.Name);

            // Act
            bool actual = ((IMethodFilter)sut).ExcludeMethod(type, methodMock.Object);

            // Assert
            Assert.False(actual);
        }
        public void ExcudeMethodWithNoType(
            Type type,
            Mock<MethodBase> methodMock,
            IEnumerable<RegexRule> otherRules,
            RegexFilter sut)
        {
            // Arrange
            methodMock.SetupGet(m => m.Name).Returns("Name" + Guid.NewGuid());
            sut.Rules.AddRange(otherRules);
            sut.ExcludeMethod(methodMock.Object.Name);

            // Act
            bool actual = ((IMethodFilter)sut).ExcludeMethod(type, methodMock.Object);

            // Assert
            Assert.True(actual);
        }