Esempio n. 1
0
 public void Should_visit_in_descending_order()
 {
     var handler = new HandlerStub();
     var reader = new AssemblyReader(handler);
     reader.Read(GetSingleTypeAssembly());
     handler.Result.ShouldEqual("Assembly Module Type Method ~Method ~Type ~Module ~Assembly");
 }
Esempio n. 2
0
        public void Should_visit_all_types()
        {
            var visited = new List<string>();
            var handler = new HandlerStub();
            var reader = new AssemblyReader(handler);

            handler.BeginTypeHandler = x => visited.Add(x.Name);
            reader.Read(GetAssemblyWithTypes(new TypeStub("Type1"), new TypeStub("Type2")));

            Assert.That(visited, Is.EquivalentTo(new[]{ "Type1", "Type2" }));
        }