Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5077 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
5 changed files with 81 additions and 23 deletions
@ -0,0 +1,53 @@
@@ -0,0 +1,53 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
|
||||
// <version>$Revision: 4723 $</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.IO; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.XmlEditor; |
||||
using NUnit.Framework; |
||||
|
||||
namespace XmlEditor.Tests.Editor |
||||
{ |
||||
[TestFixture] |
||||
public class XmlEditorFileExtensionsTestFixture |
||||
{ |
||||
AddInTreeNode addinTreeNode; |
||||
|
||||
[SetUp] |
||||
public void SetUp() |
||||
{ |
||||
|
||||
string addinXml = "<AddIn name = 'Xml Editor'\r\n" + |
||||
"author = ''\r\n" + |
||||
"copyright = 'prj:///doc/copyright.txt'\r\n" + |
||||
"description = ''\r\n" + |
||||
"addInManagerHidden = 'preinstalled'>\r\n" + |
||||
"</AddIn>"; |
||||
|
||||
using (StringReader reader = new StringReader(addinXml)) { |
||||
AddIn addin = AddIn.Load(reader); |
||||
|
||||
addinTreeNode = new AddInTreeNode(); |
||||
addinTreeNode.Codons.Add(new Codon(addin, "CodeCompletionC#", new Properties(), new ICondition[0])); |
||||
|
||||
Properties properties = new Properties(); |
||||
properties.Set<string>("extensions", " .xml; .xsd "); |
||||
properties.Set<string>("id", "Xml"); |
||||
addinTreeNode.Codons.Add(new Codon(addin, "CodeCompletionXml", properties, new ICondition[0])); |
||||
} |
||||
} |
||||
|
||||
[Test] |
||||
public void ExpectedFileExtensions() |
||||
{ |
||||
string[] expectedExtension = new string[] { ".xml", ".xsd" }; |
||||
Assert.AreEqual(expectedExtension, XmlDisplayBinding.GetXmlFileExtensions(addinTreeNode)); |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue