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)
6
using ICSharpCode.SharpDevelop.Editor.CodeCompletion;
7
using ICSharpCode.XmlEditor;
10
namespace XmlEditor.Tests.Schema
12
public abstract class SchemaTestFixtureBase
14
XmlSchemaCompletion schemaCompletion;
17
/// Gets the <see cref="XmlSchemaCompletionData"/> object generated
20
/// <remarks>This object will be null until the <see cref="FixtureInitBase"/>
21
/// has been run.</remarks>
22
public XmlSchemaCompletion SchemaCompletion {
23
get { return schemaCompletion; }
27
/// Creates the <see cref="XmlSchemaCompletionData"/> object from
28
/// the derived class's schema.
30
/// <remarks>Calls <see cref="FixtureInit"/> at the end of the method.
33
public void FixtureInitBase()
35
schemaCompletion = CreateSchemaCompletionObject();
40
/// Method overridden by derived class so it can execute its own
41
/// fixture initialisation.
43
public virtual void FixtureInit()
48
/// Returns the schema that will be used in this test fixture.
50
protected virtual string GetSchema()
56
/// Creates an <see cref="XmlSchemaCompletionData"/> object that
57
/// will be used in the test fixture.
59
protected virtual XmlSchemaCompletion CreateSchemaCompletionObject()
61
StringReader reader = new StringReader(GetSchema());
62
return new XmlSchemaCompletion(reader);