~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/DisplayBindings/XmlEditor/Test/Editor/IsEmptySchemaAssociationTests.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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)
 
3
 
 
4
using System;
 
5
using ICSharpCode.XmlEditor;
 
6
using NUnit.Framework;
 
7
 
 
8
namespace XmlEditor.Tests.Editor
 
9
{
 
10
        [TestFixture]
 
11
        public class IsEmptySchemaAssociationTests
 
12
        {
 
13
                [Test]
 
14
                public void SchemaAssociationWithBlankFileExtensionAndNamespaceUriAndNamespacePrefixIsEmpty()
 
15
                {
 
16
                        XmlSchemaFileAssociation schemaAssociation = new XmlSchemaFileAssociation(String.Empty, String.Empty, String.Empty);
 
17
                        Assert.IsTrue(schemaAssociation.IsEmpty);
 
18
                }
 
19
                
 
20
                [Test]
 
21
                public void SchemaAssociationWithFileExtensionIsNotEmpty()
 
22
                {
 
23
                        XmlSchemaFileAssociation schemaAssociation = new XmlSchemaFileAssociation(".fileExt", String.Empty, String.Empty);
 
24
                        Assert.IsFalse(schemaAssociation.IsEmpty);
 
25
                }
 
26
 
 
27
                [Test]
 
28
                public void SchemaAssociationWithNamespaceUriIsNotEmpty()
 
29
                {
 
30
                        XmlSchemaFileAssociation schemaAssociation = new XmlSchemaFileAssociation(String.Empty, "namespace-uri", String.Empty);
 
31
                        Assert.IsFalse(schemaAssociation.IsEmpty);
 
32
                }
 
33
                
 
34
                [Test]
 
35
                public void SchemaAssociationWithNamespacePrefixIsNotEmpty()
 
36
                {
 
37
                        XmlSchemaFileAssociation schemaAssociation = new XmlSchemaFileAssociation(String.Empty, String.Empty, "prefix");
 
38
                        Assert.IsFalse(schemaAssociation.IsEmpty);
 
39
                }               
 
40
        }
 
41
}