refactor: Address analysis issues

pull/153/head
Robert Dailey 1 year ago
parent 7e2a6290dc
commit fc0daf631b

@ -1,4 +1,5 @@
using System.Data.HashFunction.FNV;
using System.Globalization;
using System.IO.Abstractions;
using System.Text;
using Recyclarr.TrashLib.Cache;
@ -33,7 +34,7 @@ public class CacheStoragePath : ICacheStoragePath
public IFileInfo CalculatePath(string cacheObjectName)
{
return _paths.CacheDirectory
.SubDirectory(_serviceCommand.Name.ToLower())
.SubDirectory(_serviceCommand.Name.ToLower(CultureInfo.CurrentCulture))
.SubDirectory(_config.Name ?? BuildServiceGuid())
.File(cacheObjectName + ".json");
}

@ -8,7 +8,7 @@ namespace Recyclarr.Common.Tests.Extensions;
[Parallelizable(ParallelScope.All)]
public class DictionaryExtensionsTest
{
private class MySampleValue
private sealed class MySampleValue
{
}

@ -15,7 +15,7 @@ public static class Verify
return ArgumentMatcher.Enqueue(new AssertionMatcher<T>(action));
}
private class AssertionMatcher<T> : IArgumentMatcher<T>
private sealed class AssertionMatcher<T> : IArgumentMatcher<T>
{
private readonly Action<T> _assertion;

@ -14,20 +14,20 @@ namespace Recyclarr.TrashLib.Tests.Cache;
[Parallelizable(ParallelScope.All)]
public class ServiceCacheTest
{
private class ObjectWithoutAttribute
private sealed class ObjectWithoutAttribute
{
}
private const string ValidObjectName = "azAZ_09";
[CacheObjectName(ValidObjectName)]
private class ObjectWithAttribute
private sealed class ObjectWithAttribute
{
public string TestValue { get; init; } = "";
}
[CacheObjectName("invalid+name")]
private class ObjectWithAttributeInvalidChars
private sealed class ObjectWithAttributeInvalidChars
{
}

@ -16,7 +16,7 @@ namespace Recyclarr.TrashLib.Tests.CustomFormat;
[Parallelizable(ParallelScope.All)]
public class CachePersisterTest
{
private class Context
private sealed class Context
{
public Context()
{

@ -19,14 +19,14 @@ namespace Recyclarr.TrashLib.Tests.CustomFormat.Processors;
[Parallelizable(ParallelScope.All)]
public class GuideProcessorTest
{
private class TestGuideProcessorSteps : IGuideProcessorSteps
private sealed class TestGuideProcessorSteps : IGuideProcessorSteps
{
public ICustomFormatStep CustomFormat { get; } = new CustomFormatStep();
public IConfigStep Config { get; } = new ConfigStep();
public IQualityProfileStep QualityProfile { get; } = new QualityProfileStep();
}
private class Context
private sealed class Context
{
public Context()
{

@ -15,7 +15,7 @@ namespace Recyclarr.TrashLib.Tests.CustomFormat.Processors.GuideSteps;
[Parallelizable(ParallelScope.All)]
public class CustomFormatStepTest
{
private class Context
private sealed class Context
{
public List<CustomFormatData> TestGuideData { get; } = new()
{

@ -25,7 +25,7 @@ namespace Recyclarr.TrashLib.Tests.Sonarr;
[Parallelizable(ParallelScope.All)]
public class SonarrCompatibilityTest
{
private class TestContext : IDisposable
private sealed class TestContext : IDisposable
{
private readonly JsonSerializerSettings _jsonSettings;

Loading…
Cancel
Save