Example #1
0
        public void PluginRuntimeHandler_ValidatePlugin_WhenNullDll_ExpectErrorMessage()
        {
            //------------Setup for test--------------------------
            var pluginRuntimeHandler = new PluginRuntimeHandler();

            //------------Execute Test---------------------------
            pluginRuntimeHandler.ValidatePlugin(null);
        }
Example #2
0
        public void PluginRuntimeHandler_ValidatePlugin_WhenInvalidGacDll_ExpectErrorMessage()
        {
            //------------Setup for test--------------------------
            var pluginRuntimeHandler = new PluginRuntimeHandler();

            //------------Execute Test---------------------------
            var result = pluginRuntimeHandler.ValidatePlugin("GAC:mscorlib_foo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");

            //------------Assert Results-------------------------
            StringAssert.Contains(result, "Could not load file or assembly 'mscorlib_foo");
        }
Example #3
0
        public void PluginRuntimeHandler_ValidatePlugin_WhenGacDll_ExpectBlankMessage()
        {
            //------------Setup for test--------------------------
            var pluginRuntimeHandler = new PluginRuntimeHandler();

            //------------Execute Test---------------------------
            var result = pluginRuntimeHandler.ValidatePlugin("GAC:mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");

            //------------Assert Results-------------------------
            StringAssert.Contains(result, string.Empty);
        }
Example #4
0
        public void PluginRuntimeHandler_ValidatePlugin_WhenNotADll_ExpectErrorMessage()
        {
            //------------Setup for test--------------------------
            var pluginRuntimeHandler = new PluginRuntimeHandler();
            var source = CreatePluginSource();

            //------------Execute Test---------------------------
            var result = pluginRuntimeHandler.ValidatePlugin(source.AssemblyLocation + ".foo");

            //------------Assert Results-------------------------
            StringAssert.Contains(result, "Not a Dll file");
        }
Example #5
0
        public void PluginRuntimeHandler_ValidatePlugin_WhenValidDll_ExpectBlankMessage()
        {
            //------------Setup for test--------------------------
            var pluginRuntimeHandler = new PluginRuntimeHandler();
            var source = CreatePluginSource();

            //------------Execute Test---------------------------
            var result = pluginRuntimeHandler.ValidatePlugin(source.AssemblyLocation);

            //------------Assert Results-------------------------
            StringAssert.Contains(result, string.Empty);
        }