Ejemplo n.º 1
0
        public void InstallNode_Name_NotExist_Fail()
        {
            var tree = new InstallTree {
                Nodes = new Dictionary <string, InstallNode>()
            };

            InstallMethods.AddNode(tree, "NodeC", new List <string>()
            {
                "NodeA"
            });
            var resp = InstallMethods.InstallNodeInTree(tree, "notexist");

            Assert.IsFalse(resp.Success);
        }
Ejemplo n.º 2
0
        public void InstallTest()
        {
            var tree = new InstallTree {
                Nodes = new Dictionary <string, InstallNode>()
            };

            InstallMethods.AddNode(tree, "Http", new List <string>()
            {
                "TCP"
            });
            InstallMethods.AddNode(tree, "Https", new List <string>()
            {
                "TCP"
            });
            InstallMethods.AddNode(tree, "Chrome", new List <string>()
            {
                "Http", "Https", "GLib"
            });
            var resp = InstallMethods.InstallNodeInTree(tree, "Chrome");

            Assert.IsTrue(resp.Success);
        }
Ejemplo n.º 3
0
        public void UninstallTest()
        {
            var tree = new InstallTree {
                Nodes = new Dictionary <string, InstallNode>()
            };

            InstallMethods.AddNode(tree, "Http", new List <string>()
            {
                "TCP"
            });
            InstallMethods.AddNode(tree, "Https", new List <string>()
            {
                "TCP"
            });
            InstallMethods.AddNode(tree, "Chrome", new List <string>()
            {
                "Http", "Https", "GLib"
            });
            var resp = InstallMethods.InstallNodeInTree(tree, "Chrome");
            var r2   = InstallMethods.UnInstallNodeInTree(tree, "Http");
            var r3   = InstallMethods.UnInstallNodeInTree(tree, "Chrome");
            var r4   = InstallMethods.UnInstallNodeInTree(tree, "TCP");
        }