コード例 #1
0
ファイル: TestPluginBase.cs プロジェクト: ecell/ecell3-ide
        public void TestConstructor()
        {
            _env.DataManager.LoadProject(TestConstant.Project_Drosophila);

            TestPlugin plugin = new TestPlugin();
            Assert.IsNotNull(plugin, "Constructor of type, object failed to create instance.");
            // env
            plugin.Environment = _env;
            Assert.AreEqual(_env, plugin.Environment, "Environment is unexpected value.");
            Assert.AreEqual(_env.DataManager, plugin.DataManager, "DataManager is unexpected value.");
            Assert.AreEqual(_env.PluginManager, plugin.PluginManager, "PluginManager is unexpected value.");
            Assert.AreEqual(_env.LogManager, plugin.MessageManager, "MessageManager is unexpected value.");
            // Getter
            Assert.AreEqual("TestPlugin", plugin.GetPluginName(), "GetPluginName method returned unexpected value.");
            Assert.IsNotNull(plugin.GetVersionString(), "GetVersionString method returned unexpected value.");

            Assert.IsNotNull(plugin.GetData(null), "GetData method returned unexpected value.");
            Assert.IsNotNull(plugin.GetEcellObject("Drosophila", "/", "System"), "GetEcellObject method returned unexpected value.");
            Assert.IsNotNull(plugin.GetEcellObject(plugin.GetEcellObject("Drosophila", "/", "System")), "GetEcellObject method returned unexpected value.");
            Assert.IsNotNull(plugin.GetTemporaryID("Drosophila", "System", "/"), "GetEcellObject method returned unexpected value.");
            Assert.IsNull(plugin.GetPluginStatus(), "GetPluginStatus method returned unexpected value.");
            Assert.IsNull(plugin.GetPropertySettings(), "GetPropertySettings method returned unexpected value.");
            Assert.IsNull(plugin.GetMenuStripItems(), "GetMenuStripItems method returned unexpected value.");
            Assert.IsNull(plugin.GetToolBarMenuStrip(), "GetToolBarMenuStrip method returned unexpected value.");
            Assert.IsNull(plugin.GetWindowsForms(), "GetWindowsForms method returned unexpected value.");
            Assert.IsNull(plugin.GetPublicDelegate(), "GetPublicDelegate method returned unexpected value.");
        }