~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/DisplayBindings/XmlEditor/Test/FindSchemaObject/NullSchemaObjectPassedToSchemaObjectLocationTestFixture.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 System.Xml.Schema;
 
6
using ICSharpCode.XmlEditor;
 
7
using NUnit.Framework;
 
8
using XmlEditor.Tests.Utils;
 
9
 
 
10
namespace XmlEditor.Tests.FindSchemaObject
 
11
{
 
12
        [TestFixture]
 
13
        public class NullSchemaObjectPassedToSchemaObjectLocationTestFixture
 
14
        {
 
15
                DerivedXmlSchemaObjectLocation location;
 
16
                
 
17
                [SetUp]
 
18
                public void Init()
 
19
                {
 
20
                        XmlSchemaObject schemaObject = null;
 
21
                        location = new DerivedXmlSchemaObjectLocation(schemaObject);
 
22
                        location.JumpToFilePosition();
 
23
                }
 
24
                
 
25
                [Test]
 
26
                public void FileNameIsEmptyString()
 
27
                {
 
28
                        Assert.AreEqual(String.Empty, location.FileName);
 
29
                }
 
30
                
 
31
                [Test]
 
32
                public void LineNumberIsMinusOne()
 
33
                {
 
34
                        Assert.AreEqual(-1, location.LineNumber);
 
35
                }
 
36
                
 
37
                [Test]
 
38
                public void LinePositionIsMinusOne()
 
39
                {
 
40
                        Assert.AreEqual(-1, location.LinePosition);
 
41
                }
 
42
                
 
43
                [Test]
 
44
                public void JumpToFilePositionMethodDoesNothing()
 
45
                {
 
46
                        location.JumpToFilePosition();
 
47
                        Assert.IsFalse(location.IsDerivedJumpToFilePositionMethodCalled);
 
48
                }
 
49
        }
 
50
}