Esempio n. 1
0
 public void ExtensionMethodTest()
 {
     AssemblyBrowser.AssemblyBrowser assemblyBrowser = new AssemblyBrowser.AssemblyBrowser(_secondTestPath);
     var assemblyData = assemblyBrowser.assemblyData;
     NameSpaceData nameSpaceData = null;
     assemblyData.NameSpaces.TryGetValue("ExtensionMethodTest", out nameSpaceData);
     Assert.AreEqual("GetExtension", nameSpaceData.TypesList[1].Methods[nameSpaceData.TypesList[1].Methods.Count - 1].Name);
 }
Esempio n. 2
0
 public void NegativeTestMethod()
 {
     AssemblyBrowser.AssemblyBrowser assemblyBrowser = new AssemblyBrowser.AssemblyBrowser(_firstTestPath);
     var assemblyData = assemblyBrowser.assemblyData;
     Assert.AreNotEqual(0, assemblyData.NameSpaces.Values.Count);
     NameSpaceData nameSpaceData = null;
     assemblyData.NameSpaces.TryGetValue("TracerUtils", out nameSpaceData);
     Assert.AreNotEqual(0, nameSpaceData.TypesList.Count);
     Assert.IsFalse(assemblyData.NameSpaces.ContainsKey("Tracer"));
     Assert.AreNotEqual("String", nameSpaceData.TypesList[0].Name);
     Assert.AreNotEqual(0, nameSpaceData.TypesList[1].Properties.Count);
     Assert.AreNotEqual("thread", nameSpaceData.TypesList[3].Fields[0].Name);
 }
Esempio n. 3
0
        public void PositiveTestMethod()
        {
            AssemblyBrowser.AssemblyBrowser assemblyBrowser = new AssemblyBrowser.AssemblyBrowser(_firstTestPath);
            var assemblyData = assemblyBrowser.assemblyData;

            Assert.AreEqual(1, assemblyData.NameSpaces.Values.Count);
            NameSpaceData nameSpaceData = null;

            assemblyData.NameSpaces.TryGetValue("AssemblyBrowser", out nameSpaceData);
            Assert.AreEqual(7, nameSpaceData.TypesList.Count);
            Assert.IsTrue(assemblyData.NameSpaces.ContainsKey("AssemblyBrowser"));
            Assert.AreEqual(1, nameSpaceData.TypesList[1].Properties.Count);
        }