Source

Resharper Spell Checker / ReSpeller.RSTests / CSharpHighlightingsTest.cs

Full commit
using JetBrains.ReSharper.Daemon;
using JetBrains.ReSharper.Daemon.CSharp;
using JetBrains.Application.Settings;
using JetBrains.ReSharper.Feature.Services.Tips;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.Naming;
using NUnit.Framework;
using ReSpeller.Highlightings;

namespace ReSpeller.RSTests
{
  [TestFixture]
  public class CSharpHighlightingsTest : CSharpHighlightingTestBase
  {
    protected override bool HighlightingPredicate(IHighlighting highlighting, IContextBoundSettingsStore settingsstore)
    {
      return highlighting is StringLiteralTypoHighlighting 
        || highlighting is IdentifierTypoHighlighting
        || highlighting is CommentTypoHighlighting;
    }

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

    /// <summary>
    /// 
    /// </summary>
    /// <param name="testName"></param>
    [Test]
    [TestCase("Class.cs")]
    [TestCase("Field.cs")]
    [TestCase("Local.cs")]
    [TestCase("Method.cs")]
    [TestCase("Namespace.cs")]
    [TestCase("Property.cs")]
    [TestCase("Comment.cs")]
    public void Test(string testName)
    {
      DoTestFiles(testName);
    }
  }
}