diff --git a/tests/ImageSharp.Tests/TestFile.cs b/tests/ImageSharp.Tests/TestFile.cs index 13944cc3c..4f286f4da 100644 --- a/tests/ImageSharp.Tests/TestFile.cs +++ b/tests/ImageSharp.Tests/TestFile.cs @@ -25,17 +25,19 @@ namespace ImageSharp.Tests private static readonly ConcurrentDictionary Cache = new ConcurrentDictionary(); /// - /// The formats directory, as lazy value + /// The "Formats" directory, as lazy value /// private static readonly Lazy formatsDirectory = new Lazy(GetFormatsDirectory); - private Image _image; - private byte[] _bytes; + /// + /// The image (lazy initialized value) + /// + private Image image; /// - /// The image. + /// The image bytes /// - private Image image => this._image ?? (this._image = Image.Load(this.Bytes)); + private byte[] bytes; /// /// The file. @@ -52,9 +54,9 @@ namespace ImageSharp.Tests } /// - /// Gets the bytes. + /// Gets the image bytes. /// - public byte[] Bytes => this._bytes ?? (this._bytes = File.ReadAllBytes(this.file)); + public byte[] Bytes => this.bytes ?? (this.bytes = File.ReadAllBytes(this.file)); /// /// The file name. @@ -71,6 +73,11 @@ namespace ImageSharp.Tests /// public string FileNameWithoutExtension => Path.GetFileNameWithoutExtension(this.file); + /// + /// Gets the image with lazy initialization. + /// + private Image Image => this.image ?? (this.image = ImageSharp.Image.Load(this.Bytes)); + /// /// Gets the "Formats" test file directory. /// @@ -130,22 +137,22 @@ namespace ImageSharp.Tests /// Creates a new image. /// /// - /// The . + /// The . /// public Image CreateImage() { - return this.image.Clone(); + return this.Image.Clone(); } /// /// Creates a new image. /// /// - /// The . + /// The . /// public Image CreateImage(IImageDecoder decoder) { - return Image.Load(this.image.Configuration, this.Bytes, decoder); + return ImageSharp.Image.Load(this.Image.Configuration, this.Bytes, decoder); } ///