public void DeclaringTypeNotInterface_IsWeveable_TypeOverload_Returns_False()
        {
            // Arrange
            var selectionStategyMock = new Mock <IAspectSelector>();
            var predicate            = new DeclaringTypeWeavePredicate(
                selectionStategyMock.Object.ToInstanceHolder());

            // Act
            var isWeaveable = predicate.IsWeaveable(typeof(Service), typeof(IService));

            // Assert
            Assert.False(isWeaveable);
        }
        public void HasTypeAspects_IsWeaveable_TypeOverload_ReturnsTrue()
        {
            // Arrange
            var selectionStategyMock = new Mock <IAspectSelector>();

            selectionStategyMock.Setup(c => c.HasAnyAspect(It.IsAny <MethodInfo>())).Returns(false);
            selectionStategyMock.Setup(c => c.HasAnyAspect(It.IsAny <Type>())).Returns(true);

            var predicate = new DeclaringTypeWeavePredicate(
                selectionStategyMock.Object.ToInstanceHolder());

            // Act
            var isWeaveable = predicate.IsWeaveable(typeof(IService), typeof(Service));

            // Assert
            Assert.True(isWeaveable);
        }
        public void HasAnyAspect_MethodHasAspect_IsWeaveable_MethodOverload_ReturnsTrue()
        {
            // Arrange
            var selectionStategyMock = new Mock <IAspectSelector>();
            var method = typeof(IService).GetMethod(nameof(IService.Method));

            selectionStategyMock.Setup(c => c.HasAnyAspect(It.Is <MethodInfo>(m => m == method))).Returns(true);

            var predicate = new DeclaringTypeWeavePredicate(
                selectionStategyMock.Object.ToInstanceHolder());

            // Act
            var isWeaveable = predicate.IsWeaveable(typeof(IService), typeof(Service));

            // Assert
            Assert.True(isWeaveable);
        }