public void Accepts_ModuleEqualToDependencyGraphRoot_ReturnsTrue()
        {
            _moduleComparerMock.Setup(comparer => comparer.Equals(It.IsAny<ModuleReference>(),
                It.IsAny<ModuleReference>())).Returns(true);

            var subject = new DirectReferencesModuleFilter(_graphMock.Object, _moduleComparerMock.Object);

            Assert.IsTrue(subject.Accepts(null));
        }
        public void Accepts_ModuleUnequalButSomeChildIsEqual_ReturnsTrue()
        {
            var query = CecilUtility.Import(typeof(object)).Resolve().Module;
            var child = CecilUtility.Import(GetType()).Resolve().Module;

            _moduleComparerMock.Setup(comparer => comparer.Equals(child, It.IsAny<ModuleReference>())).Returns(false);

            _moduleComparerMock.Setup(comparer => comparer.Equals(
                    It.Is<ModuleReference>(module => IsAny(module, query, child)),
                    It.Is<ModuleReference>(module => IsAny(module, query, child))))
                .Returns(true);

            HashSet<DependencyGraphNode> nodes = new HashSet<DependencyGraphNode>();
            nodes.Add(new DependencyGraphNode(child, _moduleComparerMock.Object));
            _graphMock.SetupGet(graph => graph.Nodes).Returns(nodes);

            var subject = new DirectReferencesModuleFilter(_graphMock.Object, _moduleComparerMock.Object);
            bool result = subject.Accepts(query);

            Assert.IsTrue(result);
        }