コード例 #1
0
        public void RemoteServerUITests_EditRemotePluginSource_PluginSourceIsEdited()
        {
            // NOTE :
            // Requires a Plugin Directory on server with :
            // Plugins\PrimativesTestDLL.dll
            // And Plugins\PrimativesTestDLL - Copy.dll

            const string TextToSearchWith = "PluginSource";

            //Edit remote plugin source
            ExplorerUIMap.DoubleClickSource(TextToSearchWith, "REMOTETESTS", RemoteServerName);

            var actualLeftTitleText  = PluginSourceMap.GetLeftTitleText();
            var actualRightTitleText = PluginSourceMap.GetRightTitleText();

            Assert.AreEqual("Edit - PluginSource", actualLeftTitleText);
            Assert.AreEqual(remoteConnectionString, actualRightTitleText);

            KeyboardCommands.SendTabs(2, 250);
            KeyboardCommands.SelectAll();
            KeyboardCommands.SendDel();
            KeyboardCommands.SendKey("Plugins\\PrimativesTestDLL - Copy.dll");
            PluginServiceWizardUIMap.PressButtonOnWizard(1);
            SaveDialogUIMap.ClickSave();

            // Change it back
            ExplorerUIMap.DoubleClickSource(TextToSearchWith, "REMOTETESTS", RemoteServerName);
            KeyboardCommands.SendTabs(2, 250);
            KeyboardCommands.SelectAll();

            // get the path to see what it saved as ;)
            var path = KeyboardCommands.SendCopy();

            KeyboardCommands.SendDel();
            KeyboardCommands.SendKey("Plugins\\PrimativesTestDLL.dll");
            PluginServiceWizardUIMap.PressButtonOnWizard(1);
            SaveDialogUIMap.ClickSave();

            Assert.AreEqual(path, @"Plugins\PrimativesTestDLL - Copy.dll", "Cannot change remote plugin source");
        }