Exemple #1
0
        public void CanVisitInterfaces()
        {
            var visitor = new TracingVisitor();

            ThisAssembly.Accept(visitor);

            Assert.IsTrue(visitor.HasTouchedAll(ThisFixtureType.Interfaces));
            Assert.IsTrue(visitor.HasTouchedAll(ThisNestedType.Interfaces));
        }
Exemple #2
0
        public void CanVisitFieldDefinitions()
        {
            var visitor = new TracingVisitor();

            ThisAssembly.Accept(visitor);

            Assert.IsTrue(visitor.HasTouchedAll(ThisFixtureType.Fields));
            Assert.IsTrue(visitor.HasTouchedAll(ThisNestedType.Fields));
        }
Exemple #3
0
        public void CanVisitComposedTypes()
        {
            var visitor = new TracingVisitor();

            ThisAssembly.Accept(visitor);

            Assert.IsTrue(visitor.HasTouchedAll(ThisComposedTypes.Fields.Select(f => f.FieldType)));
            Assert.IsTrue(visitor.HasTouchedAll(ThisComposedTypes.Fields.Select(f => f.FieldType.GetElementType())));
        }
Exemple #4
0
        public void CanVisitMethodDefinitions()
        {
            var visitor = new TracingVisitor();

            ThisAssembly.Accept(visitor);

            Assert.IsTrue(visitor.HasTouchedAll(ThisFixtureType.Methods));
            Assert.IsTrue(visitor.HasTouchedAll(ThisNestedType.Methods));
            Assert.IsTrue(visitor.HasTouchedAll(ThisEmptyInterface.Methods));
        }
Exemple #5
0
        public void CanVisitMethodParameters()
        {
            var visitor = new TracingVisitor();

            ThisAssembly.Accept(visitor);

            Assert.IsTrue(visitor.HasTouchedAll(ThisModule.Types.SelectMany(t => t.Methods.SelectMany(m => m.Parameters))));
        }
Exemple #6
0
        public void CanVisitGenericParameters()
        {
            var visitor = new TracingVisitor();

            ThisAssembly.Accept(visitor);

            Assert.IsTrue(visitor.HasTouchedAll(ThisGeneric.GenericParameters));
        }
Exemple #7
0
        public void CanVisitEventDefinitions()
        {
            var visitor = new TracingVisitor();

            ThisFixtureType.Accept(visitor);

            Assert.IsTrue(visitor.HasTouchedAll(ThisFixtureType.Events));
        }