public void NamespaceSelectedButNotModifiedShouldNotBeSavedInXmlEditorOptions()
        {
            panel.SelectedXmlSchemaFileAssociationListItemIndex = 0;
            panel.SetMethodToCallWhenSchemaNamespacePrefixChanged(schemasEditor.SchemaNamespacePrefixChanged);
            schemasEditor.XmlSchemaFileAssociationFileExtensionSelectionChanged();
            schemasEditor.SaveOptions();

            Assert.IsTrue(String.IsNullOrEmpty(properties.Get("ext.bar", String.Empty)));
        }
Beispiel #2
0
        public void WhenSelectedSchemaNamespacePrefixModifiedSchemasEditorSchemaNamespacePrefixChangedMethodCalled()
        {
            XmlSchemaFileAssociationListItem xmlSchemaAssociation = new XmlSchemaFileAssociationListItem(".xml", "namespace-uri", "x");

            panel.AddXmlSchemaFileAssociationListItem(xmlSchemaAssociation);
            panel.SelectedXmlSchemaFileAssociationListItemIndex = 0;

            bool methodCalled = false;

            panel.SetMethodToCallWhenSchemaNamespacePrefixChanged(delegate() { methodCalled = true; });
            panel.SetSelectedSchemaNamespacePrefix("test");

            Assert.IsTrue(methodCalled);
        }