Inheritance: System.Reflection.Assembly
        public void VisitAssemblyElementCollectsCorrectReferencesToAttribute()
        {
            var assembly = new DelegatingAssembly
            {
                OnGetCustomAttributes = i => { Assert.False(i); return new object[] { new FactAttribute() }; }
            };
            var sut = new ReferenceCollector();
            var expected = new[] { typeof(FactAttribute).Assembly, typeof(IDisposable).Assembly };

            sut.Visit(assembly.ToElement());

            Assert.Equal(expected.OrderBy(x => x.ToString()), sut.Value.OrderBy(x => x.ToString()));
        }
        public void VisitAssemblyElementCallsBaseMethod()
        {
            var assembly = new DelegatingAssembly
            {
                OnGetTypes = () => new[] { typeof(object), typeof(int) }
            };
            var sut = new Mock<ReferenceCollector> { CallBase = true }.Object;
            var visitor1 = new Mock<ReferenceCollector>().Object;
            var visitor2 = new Mock<ReferenceCollector>().Object;
            sut.ToMock().Setup(x => x.Visit(typeof(object).ToElement())).Returns(visitor1);
            visitor1.ToMock().Setup(x => x.Visit(typeof(int).ToElement())).Returns(visitor2);

            var actual = sut.Visit(assembly.ToElement());

            Assert.Equal(visitor2, actual);
        }