public void nm_ur_01()
        {
            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-ur");

            UnresolvedDependencyException e = null;
            // This will look for a specific version of nm-ur-01b
            try {
                _mc.LoadModule ("nm-ur-01a");
            } catch (UnresolvedDependencyException exc) {
                e = exc;
            }

            Assert.IsFalse (_mc.IsLoaded ("nm-ur-01a"), "nm-ur-01a is loaded, it should not be.");
            Assert.IsFalse (_mc.IsLoaded ("nm-ur-01b"), "nm-ur-01a is loaded, it should not be.");
            Assert.IsFalse (_mc.IsLoaded ("nm-ur-01c"), "nm-ur-01a is loaded, it should not be.");
            Assert.IsFalse (_mc.IsLoaded ("nm-ur-01d"), "nm-ur-01a is loaded, it should not be.");
            Assert.IsFalse (_mc.IsLoaded ("nm-ur-01e"), "nm-ur-01a is loaded, it should not be.");
            Assert.IsFalse (_mc.IsLoaded ("nm-ur-01f"), "nm-ur-01a is loaded, it should not be.");
            Assert.IsFalse (_mc.IsLoaded ("nm-ur-01g"), "nm-ur-01a is loaded, it should not be.");

            if (e != null)
                throw e;
        }
        public void nm_cr_03()
        {
            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-cr");

            _mc.LoadModule ("nm-cr-03a");
        }
        public void nm_ld_02()
        {
            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-ld");

            _mc.LoadModule ("nm-ld-02");
        }
        public void nm_ul_01()
        {
            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-ul");

            _mc.LoadModule ("nm-ul-01");

            _mc.UnloadModule ("nm-ul-01");
        }
        public void nm_rc_03()
        {
            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-rc");

            _mc.LoadModule ("nm-rc-03a");

            Assert.IsTrue (_mc.RefCount ("nm-rc-03c") == 3);
        }
        public void nm_rr_01()
        {
            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-rr");

            _mc.RegisterNewRole ("INmRr1", typeof (INmRr1), RegisterINmRr1, UnregisterINmRr1);

            _mc.LoadModule ("nm-rr-01a");

            Assert.IsTrue (CallINmRr1 () == "I am an instantiated nm_rr_01a, go me!");
        }
        public void nm_dr_02()
        {
            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-dr");

            // This will look for a specific version of nm-dr-01b
            _mc.LoadModule ("nm-dr-02a");

            // If it worked, we should have a domain for nm-dr-01b
            Assert.IsTrue (_mc.IsLoaded ("nm-dr-02a"));
            Assert.IsTrue (_mc.IsLoaded ("nm-dr-02b"));
        }
        public void nm_ur_02()
        {
            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-ur");

            // This will look for a specific version of nm-ur-01b
            _mc.LoadModule ("nm-ur-02a");
        }
        public void nm_ur_14()
        {
            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-ur");

            _mc.LoadModule ("nm-ur-14a");
        }
 public DepResolver(ModuleController controller, ArrayList search_path)
 {
     _controller = controller;
     _search_path = search_path;
 }
Exemple #11
0
        public void nm_dr_14()
        {
            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-dr");

            _mc.LoadModule ("nm-dr-14a");

            Assert.IsTrue (_mc.IsLoaded ("nm-dr-14a"));
            Assert.IsTrue (_mc.IsLoaded ("nm-dr-14b"));
            Assert.IsTrue (_mc.IsLoaded ("nm-dr-14c"));
            Assert.IsFalse (_mc.IsLoaded ("nm-dr-14d"));
        }
Exemple #12
0
        public void nm_dr_08()
        {
            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-dr");

            _mc.LoadModule ("nm-dr-08a");

            Assert.IsTrue (_mc.IsLoaded ("nm-dr-08a"));
            Assert.IsTrue (_mc.IsLoaded ("nm-dr-08b"));
            Assert.IsTrue (_mc.IsLoaded ("nm-dr-08c"));
        }
        public void nm_ul_02()
        {
            Console.WriteLine ("nm_ul_02");

            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-ul");

            _mc.LoadModule ("nm-ul-02");

            _mc.LoadModule ("nm-ul-02");

            _mc.UnloadModule ("nm-ul-02");
        }
        public void nm_ld_06()
        {
            Console.WriteLine ("nm_ld_06");

            ModuleController _mc = new ModuleController ();

            _mc.SearchPath.Add ("data/nm-ld");
            _mc.SearchPath.Add ("data/nm-ld-2");
            _mc.SearchPath.Add ("data/nm-ld-3");

            _mc.LoadModule ("nm-ld-06");
        }
 public ModuleLoader(ArrayList search_path, ModuleController controller)
 {
     _search_path = search_path;
     _controller = controller;
 }