diff --git a/tests/Magick.NET.Tests/TestHelpers/TemporaryFile.cs b/tests/Magick.NET.Tests/TestHelpers/TemporaryFile.cs index eab1538d26..94db448e69 100644 --- a/tests/Magick.NET.Tests/TestHelpers/TemporaryFile.cs +++ b/tests/Magick.NET.Tests/TestHelpers/TemporaryFile.cs @@ -6,7 +6,7 @@ namespace Magick.NET.Tests; -public class TemporaryFile : IDisposable +public sealed class TemporaryFile : IDisposable { private readonly FileInfo _file; @@ -39,7 +39,7 @@ public FileInfo File public void Dispose() => Cleanup.DeleteFile(_file); - private FileInfo CreateEmptyFile(string fileName) + private static FileInfo CreateEmptyFile(string fileName) { var file = new FileInfo(Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() + fileName)); file.Create().Dispose(); @@ -48,7 +48,7 @@ private FileInfo CreateEmptyFile(string fileName) return file; } - private FileInfo CreateFromFile(string fileName) + private static FileInfo CreateFromFile(string fileName) { var file = new FileInfo(Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() + Path.GetFileName(fileName))); FileHelper.Copy(fileName, file.FullName);