Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
russcam committed May 21, 2024
1 parent 3ffe3fa commit 5f6db10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tests/Lingua.AccuracyReport.Tests/ILanguageDetector.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Lingua.AccuracyReport.Tests;

/// <summary>
/// Adapter for testing language detector implementations
/// </summary>
public interface ILanguageDetector
{
public Language DetectLanguageOf(string text, Language expectedLanguage);
Expand Down
4 changes: 2 additions & 2 deletions tests/Lingua.AccuracyReport.Tests/TextFileDataAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class TextFileDataDiscoverer : DataDiscoverer

[DataDiscoverer("Lingua.AccuracyReport.Tests.TextFileDataDiscoverer", "Lingua.AccuracyReport.Tests")]
[AttributeUsage(AttributeTargets.Method)]
public class TextFileDataAttribute(string name, Language language) : DataAttribute
public class TextFileDataAttribute(string testDirectoryName, Language language) : DataAttribute
{
private static readonly string TestDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!;

Expand All @@ -27,7 +27,7 @@ public override IEnumerable<object[]> GetData(MethodInfo testMethod)
var path = Path.Combine(
TestDirectory,
"LanguageTestData",
name,
testDirectoryName,
$"{language.IsoCode6391().ToString().ToLowerInvariant()}.txt");

if (!File.Exists(path))
Expand Down

0 comments on commit 5f6db10

Please sign in to comment.