~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/DisplayBindings/XmlEditor/Test/Schema.Includes/AttributeGroupRefSchemaIncludeTestFixture.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 ICSharpCode.XmlEditor;
 
5
using NUnit.Framework;
 
6
using System;
 
7
using System.IO;
 
8
using System.Text;
 
9
using System.Xml;
 
10
using XmlEditor.Tests.Utils;
 
11
using XmlEditor.Tests.Schema;
 
12
 
 
13
namespace XmlEditor.Tests.Schema.Includes
 
14
{
 
15
        /// <summary>
 
16
        /// Tests that schemas referenced via xs:include elements are used when
 
17
        /// generating completion data.
 
18
        /// </summary>
 
19
        [TestFixture]
 
20
        public class AttributeGroupRefSchemaIncludeTestFixture : AttributeGroupRefTestFixture
 
21
        {
 
22
                [TestFixtureTearDown]
 
23
                public void FixtureTearDown()
 
24
                {
 
25
                        SchemaIncludeTestFixtureHelper.FixtureTearDown();
 
26
                }
 
27
                
 
28
                protected override XmlSchemaCompletion CreateSchemaCompletionObject()
 
29
                {       
 
30
                        return SchemaIncludeTestFixtureHelper.CreateSchemaCompletionDataObject(GetMainSchema(), GetSchema());
 
31
                }
 
32
                
 
33
                string GetMainSchema()
 
34
                {
 
35
                        return "<xs:schema \r\n" +
 
36
                                "targetNamespace=\"http://www.w3schools.com\" \r\n" +
 
37
                                "xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" \r\n" +
 
38
                                "elementFormDefault=\"qualified\">\r\n" +
 
39
                                "\t<xs:include schemaLocation=\"include.xsd\"/>\r\n" +
 
40
                                "</xs:schema>";
 
41
                }
 
42
        }
 
43
}