Exemplo n.º 1
0
 public void FullApiTest()
 {
     var mock = new Mock<IApiExtractorFactory>();
     var extractor = new Mock<IApiExtractor>();
     mock.Setup(x => x.BuildExtractor()).Returns(extractor.Object);
     var loader = new AssemblyLoader(mock.Object);
     var api = loader.ExtractApi("myAssembly.dll");
     var api2 = loader.ExtractApi("myAssembly2.dll");
     var comparer = new AssemblyApiComparer();
     var comparison = comparer.CompareApi(api, api2);
     Assert.IsNotNull(comparison.ToString());
 }
Exemplo n.º 2
0
 public void LoadAssemblyTest()
 {
     var loader = new AssemblyLoader(new AppDomainExtractorFactory());
     var api = loader.ExtractApi("nunit.framework.dll");
     foreach (var n in api.GetNamespaces())
     {
         Console.WriteLine(n.ToString());
     }
 }