Source

Resharper Spell Checker / ReSpeller.RSTests / XmlHighlightingsTest.cs

Full commit
using JetBrains.ReSharper.Daemon;
using JetBrains.ReSharper.Daemon.CSharp;
using JetBrains.Application.Settings;
using JetBrains.ReSharper.Daemon.Test;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.Xml;
using NUnit.Framework;
using ReSpeller.Highlightings;

namespace ReSpeller.RSTests
{
  [TestFixture]
  public class XmlHighlightingTest : HighlightingTestBase
  {
    protected override bool HighlightingPredicate(IHighlighting highlighting, IContextBoundSettingsStore settingsstore)
    {
      return highlighting is MarkupTextTypoHighlighting
        || highlighting is CommentTypoHighlighting
        || highlighting is MarkupAttributeTypoHighlighting;
    }

    protected override PsiLanguageType CompilerIdsLanguage
    {
      get { return XmlLanguage.Instance; }
    }

    protected override string RelativeTestDataPath
    {
      get { return @"Highlightings\Xml"; }
    }

    [Test]
    [TestCase("Xml.xml")]
    public void Test(string testName)
    {
      DoTestFiles(testName);
    }
  }
}