public void CanVisitAssemblyDefinition() { var visitor = new TracingVisitor(); ThisAssembly.Accept(visitor); Assert.IsTrue(visitor.HasTouched(ThisAssembly)); }
public void CanVisitMethodParameters() { var visitor = new TracingVisitor(); ThisAssembly.Accept(visitor); Assert.IsTrue(visitor.HasTouchedAll(ThisModule.Types.SelectMany(t => t.Methods.SelectMany(m => m.Parameters)))); }
public void CanVisitGenericParameters() { var visitor = new TracingVisitor(); ThisAssembly.Accept(visitor); Assert.IsTrue(visitor.HasTouchedAll(ThisGeneric.GenericParameters)); }
public void CanVisitFieldDefinitions() { var visitor = new TracingVisitor(); ThisAssembly.Accept(visitor); Assert.IsTrue(visitor.HasTouchedAll(ThisFixtureType.Fields)); Assert.IsTrue(visitor.HasTouchedAll(ThisNestedType.Fields)); }
public void CanVisitInterfaces() { var visitor = new TracingVisitor(); ThisAssembly.Accept(visitor); Assert.IsTrue(visitor.HasTouchedAll(ThisFixtureType.Interfaces)); Assert.IsTrue(visitor.HasTouchedAll(ThisNestedType.Interfaces)); }
public void CanVisitBaseTypes() { var visitor = new TracingVisitor(); ThisAssembly.Accept(visitor); Assert.IsTrue(visitor.HasTouched(ThisFixtureType.BaseType)); Assert.IsTrue(visitor.HasTouched(ThisNestedType.BaseType)); }
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()))); }
public void CanVisitTypeDefinitionsInTree() { var visitor = new TracingVisitor(); ThisAssembly.Accept(visitor); Assert.IsTrue(visitor.HasTouched(ThisAssembly)); Assert.IsTrue(visitor.HasTouched(ThisModule)); Assert.IsTrue(visitor.HasTouched(ThisFixtureType)); }
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)); }
public void DontCrashWithNullVisitor() { ThisAssembly.Accept(null); }