1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using ICSharpCode.XmlEditor;
8
namespace XmlEditor.Tests.Editor
11
public class SchemaAssociationsAreEqualTests
14
public void DoNotMatchIfNamespacePrefixesAreDifferent()
16
XmlSchemaFileAssociation lhs = new XmlSchemaFileAssociation("ext", "namespaceUri", "prefix");
17
XmlSchemaFileAssociation rhs = new XmlSchemaFileAssociation("ext", "namespaceUri", "different-prefix");
18
Assert.IsFalse(lhs.Equals(rhs));
22
public void MatchIfFileExtensionAndNamespaceUriAndPrefixMatch()
24
XmlSchemaFileAssociation lhs = new XmlSchemaFileAssociation("ext", "namespaceUri", "prefix");
25
XmlSchemaFileAssociation rhs = new XmlSchemaFileAssociation("ext", "namespaceUri", "prefix");
26
Assert.IsTrue(lhs.Equals(rhs));
30
public void DoNotMatchIfFileExtensionsAreDifferent()
32
XmlSchemaFileAssociation lhs = new XmlSchemaFileAssociation("ext", "namespaceUri", "prefix");
33
XmlSchemaFileAssociation rhs = new XmlSchemaFileAssociation("different-ext", "namespaceUri", "prefix");
34
Assert.IsFalse(lhs.Equals(rhs));
38
public void DoNotMatchNamespacesDifferent()
40
XmlSchemaFileAssociation lhs = new XmlSchemaFileAssociation("ext", "namespaceUri", "prefix");
41
XmlSchemaFileAssociation rhs = new XmlSchemaFileAssociation("ext", "different-namespaceUri", "prefix");
42
Assert.IsFalse(lhs.Equals(rhs));
46
public void DoesNotMatchAStringObject()
48
XmlSchemaFileAssociation lhs = new XmlSchemaFileAssociation("ext", "namespaceUri", "prefix");
49
Assert.IsFalse(lhs.Equals("String"));