From 7e5dde0875b4fe23a889d0b7838fea04bad03e0c Mon Sep 17 00:00:00 2001 From: Ildar Khayrutdinov Date: Sun, 11 Aug 2019 12:44:53 +0300 Subject: [PATCH] Move tiff classes into Formats.Tiff namespace. Mark tests with category. --- src/ImageSharp/Configuration.cs | 1 + .../Formats/Tiff/ITiffDecoderOptions.cs | 2 +- .../Formats/Tiff/ITiffEncoderOptions.cs | 2 +- .../Formats/Tiff/ImageExtensions.cs | 2 +- .../Formats/Tiff/TiffConfigurationModule.cs | 2 +- src/ImageSharp/Formats/Tiff/TiffDecoder.cs | 2 +- .../Formats/Tiff/TiffDecoderCore.cs | 5 ++--- src/ImageSharp/Formats/Tiff/TiffEncoder.cs | 2 +- .../Formats/Tiff/TiffEncoderCore.cs | 2 +- src/ImageSharp/Formats/Tiff/TiffFormat.cs | 2 +- .../Formats/Tiff/TiffImageFormatDetector.cs | 2 +- .../Formats/Tiff/TiffMetadataNames.cs | 2 +- .../DeflateTiffCompressionTests.cs | 16 ++++++-------- .../Compression/LzwTiffCompressionTests.cs | 13 ++++++----- .../Compression/NoneTiffCompressionTests.cs | 14 ++++++------ .../PackBitsTiffCompressionTests.cs | 14 ++++++------ .../BlackIsZeroTiffColorTests.cs | 12 +++++----- .../PaletteTiffColorTests.cs | 12 +++++----- .../PhotometricInterpretationTestBase.cs | 13 ++++++----- .../RgbPlanarTiffColorTests.cs | 12 +++++----- .../RgbTiffColorTests.cs | 12 +++++----- .../WhiteIsZeroTiffColorTests.cs | 12 +++++----- .../Formats/Tiff/TiffDecoderHeaderTests.cs | 13 +++++------ .../Formats/Tiff/TiffDecoderIfdEntryTests.cs | 19 +++++++--------- .../Formats/Tiff/TiffDecoderIfdTests.cs | 15 ++++++------- .../Formats/Tiff/TiffDecoderImageTests.cs | 14 +++++------- .../Formats/Tiff/TiffDecoderMetadataTests.cs | 13 +++++------ .../Formats/Tiff/TiffEncoderHeaderTests.cs | 16 ++++++-------- .../Formats/Tiff/TiffEncoderIfdTests.cs | 22 +++++++++---------- .../Formats/Tiff/TiffEncoderMetadataTests.cs | 15 +++++-------- .../Formats/Tiff/TiffFormatTests.cs | 12 +++++----- .../Tiff/TiffIfd/TiffIfdEntryCreatorTests.cs | 18 +++++++-------- .../Formats/Tiff/TiffIfd/TiffIfdEntryTests.cs | 12 +++++----- .../Formats/Tiff/TiffIfd/TiffIfdTests.cs | 12 +++++----- .../Tiff/TiffImageFormatDetectorTests.cs | 14 ++++++------ .../Formats/Tiff/Utils/SubStreamTests.cs | 16 +++++++------- .../Formats/Tiff/Utils/TiffWriterTests.cs | 14 ++++++------ 37 files changed, 175 insertions(+), 206 deletions(-) diff --git a/src/ImageSharp/Configuration.cs b/src/ImageSharp/Configuration.cs index 062bcb229c..3ed61aa6c1 100644 --- a/src/ImageSharp/Configuration.cs +++ b/src/ImageSharp/Configuration.cs @@ -10,6 +10,7 @@ using SixLabors.ImageSharp.Formats.Gif; using SixLabors.ImageSharp.Formats.Jpeg; using SixLabors.ImageSharp.Formats.Png; using SixLabors.ImageSharp.Formats.Tga; +using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Processing; diff --git a/src/ImageSharp/Formats/Tiff/ITiffDecoderOptions.cs b/src/ImageSharp/Formats/Tiff/ITiffDecoderOptions.cs index fb0c93a60f..cee66694ba 100644 --- a/src/ImageSharp/Formats/Tiff/ITiffDecoderOptions.cs +++ b/src/ImageSharp/Formats/Tiff/ITiffDecoderOptions.cs @@ -1,7 +1,7 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Formats +namespace SixLabors.ImageSharp.Formats.Tiff { /// /// Encapsulates the options for the . diff --git a/src/ImageSharp/Formats/Tiff/ITiffEncoderOptions.cs b/src/ImageSharp/Formats/Tiff/ITiffEncoderOptions.cs index 2c8e222e8b..98efa52cdc 100644 --- a/src/ImageSharp/Formats/Tiff/ITiffEncoderOptions.cs +++ b/src/ImageSharp/Formats/Tiff/ITiffEncoderOptions.cs @@ -1,7 +1,7 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Formats +namespace SixLabors.ImageSharp.Formats.Tiff { /// /// Encapsulates the options for the . diff --git a/src/ImageSharp/Formats/Tiff/ImageExtensions.cs b/src/ImageSharp/Formats/Tiff/ImageExtensions.cs index 117ad2a9cf..611f99538f 100644 --- a/src/ImageSharp/Formats/Tiff/ImageExtensions.cs +++ b/src/ImageSharp/Formats/Tiff/ImageExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. using System.IO; -using SixLabors.ImageSharp.Formats; +using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.PixelFormats; namespace SixLabors.ImageSharp diff --git a/src/ImageSharp/Formats/Tiff/TiffConfigurationModule.cs b/src/ImageSharp/Formats/Tiff/TiffConfigurationModule.cs index 4347b0daeb..e96dba2077 100644 --- a/src/ImageSharp/Formats/Tiff/TiffConfigurationModule.cs +++ b/src/ImageSharp/Formats/Tiff/TiffConfigurationModule.cs @@ -1,7 +1,7 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Formats +namespace SixLabors.ImageSharp.Formats.Tiff { /// /// Registers the image encoders, decoders and mime type detectors for the TIFF format. diff --git a/src/ImageSharp/Formats/Tiff/TiffDecoder.cs b/src/ImageSharp/Formats/Tiff/TiffDecoder.cs index ea93258c6c..ba52e42662 100644 --- a/src/ImageSharp/Formats/Tiff/TiffDecoder.cs +++ b/src/ImageSharp/Formats/Tiff/TiffDecoder.cs @@ -6,7 +6,7 @@ using System.Threading; using System.Threading.Tasks; using SixLabors.ImageSharp.PixelFormats; -namespace SixLabors.ImageSharp.Formats +namespace SixLabors.ImageSharp.Formats.Tiff { /// /// Image decoder for generating an image out of a TIFF stream. diff --git a/src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs b/src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs index 8e986f8478..f134376ffe 100644 --- a/src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs +++ b/src/ImageSharp/Formats/Tiff/TiffDecoderCore.cs @@ -5,11 +5,10 @@ using System; using System.Buffers; using System.IO; using System.Text; -using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.PixelFormats; -namespace SixLabors.ImageSharp.Formats +namespace SixLabors.ImageSharp.Formats.Tiff { /// /// Performs the tiff decoding operation. @@ -24,7 +23,7 @@ namespace SixLabors.ImageSharp.Formats /// /// Gets or sets a value indicating whether the metadata should be ignored when the image is being decoded. /// - private bool ignoreMetadata; + private readonly bool ignoreMetadata; /// /// Initializes a new instance of the class. diff --git a/src/ImageSharp/Formats/Tiff/TiffEncoder.cs b/src/ImageSharp/Formats/Tiff/TiffEncoder.cs index 319b1465b2..4c0d5dff8a 100644 --- a/src/ImageSharp/Formats/Tiff/TiffEncoder.cs +++ b/src/ImageSharp/Formats/Tiff/TiffEncoder.cs @@ -6,7 +6,7 @@ using System.Threading; using System.Threading.Tasks; using SixLabors.ImageSharp.PixelFormats; -namespace SixLabors.ImageSharp.Formats +namespace SixLabors.ImageSharp.Formats.Tiff { /// /// Encoder for writing the data image to a stream in TIFF format. diff --git a/src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs b/src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs index d07e5319f8..2fa7e79258 100644 --- a/src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs +++ b/src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs @@ -7,7 +7,7 @@ using System.IO; using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.PixelFormats; -namespace SixLabors.ImageSharp.Formats +namespace SixLabors.ImageSharp.Formats.Tiff { /// /// Performs the TIFF encoding operation. diff --git a/src/ImageSharp/Formats/Tiff/TiffFormat.cs b/src/ImageSharp/Formats/Tiff/TiffFormat.cs index e4acdad144..1ee5c89ccd 100644 --- a/src/ImageSharp/Formats/Tiff/TiffFormat.cs +++ b/src/ImageSharp/Formats/Tiff/TiffFormat.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using SixLabors.ImageSharp.Formats.Tiff; -namespace SixLabors.ImageSharp.Formats +namespace SixLabors.ImageSharp.Formats.Tiff { /// /// Encapsulates the means to encode and decode Tiff images. diff --git a/src/ImageSharp/Formats/Tiff/TiffImageFormatDetector.cs b/src/ImageSharp/Formats/Tiff/TiffImageFormatDetector.cs index 15e2bb2fbe..f7e6f7a997 100644 --- a/src/ImageSharp/Formats/Tiff/TiffImageFormatDetector.cs +++ b/src/ImageSharp/Formats/Tiff/TiffImageFormatDetector.cs @@ -3,7 +3,7 @@ using System; -namespace SixLabors.ImageSharp.Formats +namespace SixLabors.ImageSharp.Formats.Tiff { /// /// Detects tiff file headers diff --git a/src/ImageSharp/Formats/Tiff/TiffMetadataNames.cs b/src/ImageSharp/Formats/Tiff/TiffMetadataNames.cs index a25882302a..a610df8149 100644 --- a/src/ImageSharp/Formats/Tiff/TiffMetadataNames.cs +++ b/src/ImageSharp/Formats/Tiff/TiffMetadataNames.cs @@ -1,7 +1,7 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Formats +namespace SixLabors.ImageSharp.Formats.Tiff { /// /// Defines constants for each of the supported TIFF metadata types. diff --git a/tests/ImageSharp.Tests/Formats/Tiff/Compression/DeflateTiffCompressionTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/Compression/DeflateTiffCompressionTests.cs index faf61f8726..66868d3dc8 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/Compression/DeflateTiffCompressionTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/Compression/DeflateTiffCompressionTests.cs @@ -1,16 +1,14 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using System.IO; - using Xunit; - - using ImageSharp.Formats; - using ImageSharp.Formats.Tiff; - - using SixLabors.ImageSharp.Formats.Png.Zlib; +using System.IO; +using SixLabors.ImageSharp.Formats.Png.Zlib; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class DeflateTiffCompressionTests { [Theory] diff --git a/tests/ImageSharp.Tests/Formats/Tiff/Compression/LzwTiffCompressionTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/Compression/LzwTiffCompressionTests.cs index af853d6c9d..de4d5f46d0 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/Compression/LzwTiffCompressionTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/Compression/LzwTiffCompressionTests.cs @@ -1,12 +1,13 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using System.IO; - using Xunit; - using ImageSharp.Formats.Tiff; +using System.IO; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class LzwTiffCompressionTests { [Theory] @@ -40,4 +41,4 @@ namespace SixLabors.ImageSharp.Tests return compressedStream; } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/Compression/NoneTiffCompressionTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/Compression/NoneTiffCompressionTests.cs index 39fc3e6052..8e0d81fa43 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/Compression/NoneTiffCompressionTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/Compression/NoneTiffCompressionTests.cs @@ -1,13 +1,13 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using System.IO; - using Xunit; - - using ImageSharp.Formats.Tiff; +using System.IO; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class NoneTiffCompressionTests { [Theory] @@ -23,4 +23,4 @@ namespace SixLabors.ImageSharp.Tests Assert.Equal(expectedResult, buffer); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/Compression/PackBitsTiffCompressionTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/Compression/PackBitsTiffCompressionTests.cs index 707dad1e0a..3888f6bf97 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/Compression/PackBitsTiffCompressionTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/Compression/PackBitsTiffCompressionTests.cs @@ -1,13 +1,13 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using System.IO; - using Xunit; - - using ImageSharp.Formats.Tiff; +using System.IO; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class PackBitsTiffCompressionTests { [Theory] @@ -30,4 +30,4 @@ namespace SixLabors.ImageSharp.Tests Assert.Equal(expectedResult, buffer); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/BlackIsZeroTiffColorTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/BlackIsZeroTiffColorTests.cs index 113f6928e1..20fd53f417 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/BlackIsZeroTiffColorTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/BlackIsZeroTiffColorTests.cs @@ -1,15 +1,13 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. +using System.Collections.Generic; +using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.PixelFormats; +using Xunit; -namespace SixLabors.ImageSharp.Tests +namespace SixLabors.ImageSharp.Tests.Formats.Tiff { - using System.Collections.Generic; - using Xunit; - - using ImageSharp.Formats.Tiff; - public class BlackIsZeroTiffColorTests : PhotometricInterpretationTestBase { private static Rgba32 Gray000 = new Rgba32(0, 0, 0, 255); @@ -161,4 +159,4 @@ namespace SixLabors.ImageSharp.Tests }); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/PaletteTiffColorTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/PaletteTiffColorTests.cs index 895a8af92e..4f6bef0cf7 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/PaletteTiffColorTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/PaletteTiffColorTests.cs @@ -1,15 +1,13 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. +using System.Collections.Generic; +using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.PixelFormats; +using Xunit; -namespace SixLabors.ImageSharp.Tests +namespace SixLabors.ImageSharp.Tests.Formats.Tiff { - using System.Collections.Generic; - using Xunit; - - using ImageSharp.Formats.Tiff; - public class PaletteTiffColorTests : PhotometricInterpretationTestBase { public static uint[][] Palette4_ColorPalette { get => GeneratePalette(16); } @@ -140,4 +138,4 @@ namespace SixLabors.ImageSharp.Tests return result; } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/PhotometricInterpretationTestBase.cs b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/PhotometricInterpretationTestBase.cs index 8c40a7bddf..da48086bb3 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/PhotometricInterpretationTestBase.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/PhotometricInterpretationTestBase.cs @@ -1,16 +1,17 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. +using System; +using System.Collections.Generic; +using SixLabors.ImageSharp.Formats.Tiff; +using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Processing; +using Xunit; -namespace SixLabors.ImageSharp.Tests +namespace SixLabors.ImageSharp.Tests.Formats.Tiff { - using System; - using Xunit; - using ImageSharp; - using SixLabors.ImageSharp.Memory; - + [Trait("Category", "Tiff")] public abstract class PhotometricInterpretationTestBase { public static Rgba32 DefaultColor = new Rgba32(42, 96, 18, 128); diff --git a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/RgbPlanarTiffColorTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/RgbPlanarTiffColorTests.cs index 810e8e731c..cc025a452f 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/RgbPlanarTiffColorTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/RgbPlanarTiffColorTests.cs @@ -1,15 +1,13 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. +using System.Collections.Generic; +using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.PixelFormats; +using Xunit; -namespace SixLabors.ImageSharp.Tests +namespace SixLabors.ImageSharp.Tests.Formats.Tiff { - using System.Collections.Generic; - using Xunit; - - using ImageSharp.Formats.Tiff; - public class RgbPlanarTiffColorTests : PhotometricInterpretationTestBase { private static Rgba32 Rgb4_000 = new Rgba32(0, 0, 0, 255); @@ -196,4 +194,4 @@ namespace SixLabors.ImageSharp.Tests }); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/RgbTiffColorTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/RgbTiffColorTests.cs index 6523a9a192..5683e47526 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/RgbTiffColorTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/RgbTiffColorTests.cs @@ -1,15 +1,13 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. +using System.Collections.Generic; +using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.PixelFormats; +using Xunit; -namespace SixLabors.ImageSharp.Tests +namespace SixLabors.ImageSharp.Tests.Formats.Tiff { - using System.Collections.Generic; - using Xunit; - - using ImageSharp.Formats.Tiff; - public class RgbTiffColorTests : PhotometricInterpretationTestBase { private static Rgba32 Rgb4_000 = new Rgba32(0, 0, 0, 255); @@ -158,4 +156,4 @@ namespace SixLabors.ImageSharp.Tests }); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/WhiteIsZeroTiffColorTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/WhiteIsZeroTiffColorTests.cs index 054368e21f..5334e29849 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/WhiteIsZeroTiffColorTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/PhotometricInterpretation/WhiteIsZeroTiffColorTests.cs @@ -1,15 +1,13 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. +using System.Collections.Generic; +using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.PixelFormats; +using Xunit; -namespace SixLabors.ImageSharp.Tests +namespace SixLabors.ImageSharp.Tests.Formats.Tiff { - using System.Collections.Generic; - using Xunit; - - using ImageSharp.Formats.Tiff; - public class WhiteIsZeroTiffColorTests : PhotometricInterpretationTestBase { private static Rgba32 Gray000 = new Rgba32(255, 255, 255, 255); @@ -161,4 +159,4 @@ namespace SixLabors.ImageSharp.Tests }); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderHeaderTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderHeaderTests.cs index d038b69cd4..275da7da1e 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderHeaderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderHeaderTests.cs @@ -1,15 +1,14 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. +using System.IO; +using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.PixelFormats; +using Xunit; -namespace SixLabors.ImageSharp.Tests +namespace SixLabors.ImageSharp.Tests.Formats.Tiff { - using System.IO; - using Xunit; - - using ImageSharp.Formats; - + [Trait("Category", "Tiff")] public class TiffDecoderHeaderTests { public static object[][] IsLittleEndianValues = new[] { new object[] { false }, @@ -108,4 +107,4 @@ namespace SixLabors.ImageSharp.Tests Assert.Equal("Invalid TIFF file header.", e.Message); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderIfdEntryTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderIfdEntryTests.cs index b39cecb18b..f8d41cb864 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderIfdEntryTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderIfdEntryTests.cs @@ -1,18 +1,15 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using System; - using System.IO; - using System.Linq; - using Xunit; - - using ImageSharp.Formats; - using ImageSharp.Formats.Tiff; - - using SixLabors.ImageSharp.Metadata.Profiles.Exif; +using System; +using System.IO; +using System.Linq; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class TiffDecoderIfdEntryTests { [Theory] diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderIfdTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderIfdTests.cs index 0b018dfc52..97ace8bed4 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderIfdTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderIfdTests.cs @@ -1,14 +1,13 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using System.IO; - using Xunit; - - using ImageSharp.Formats; - using ImageSharp.Formats.Tiff; +using System.IO; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class TiffDecoderIfdTests { public static object[][] IsLittleEndianValues = new[] { new object[] { false }, @@ -106,4 +105,4 @@ namespace SixLabors.ImageSharp.Tests Assert.Equal(expectedData, entry.Value); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderImageTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderImageTests.cs index 8e40015a52..52f321a479 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderImageTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderImageTests.cs @@ -1,17 +1,15 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. +using System; +using System.IO; +using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.PixelFormats; +using Xunit; -namespace SixLabors.ImageSharp.Tests +namespace SixLabors.ImageSharp.Tests.Formats.Tiff { - using System; - using System.IO; - using Xunit; - - using ImageSharp.Formats; - using ImageSharp.Formats.Tiff; - + [Trait("Category", "Tiff")] public class TiffDecoderImageTests { public const int ImageWidth = 200; diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderMetadataTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderMetadataTests.cs index ecc5104615..b36d4e02f1 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderMetadataTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffDecoderMetadataTests.cs @@ -1,17 +1,14 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. +using System.IO; +using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.PixelFormats; +using Xunit; -namespace SixLabors.ImageSharp.Tests +namespace SixLabors.ImageSharp.Tests.Formats.Tiff { - using System.IO; - using System.Linq; - using Xunit; - - using ImageSharp.Formats; - using ImageSharp.Formats.Tiff; - + [Trait("Category", "Tiff")] public class TiffDecoderMetadataTests { public static object[][] BaselineMetadataValues = new[] { new object[] { false, TiffTags.Artist, TiffMetadataNames.Artist, "My Artist Name" }, diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderHeaderTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderHeaderTests.cs index e1086e735d..2af1b52250 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderHeaderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderHeaderTests.cs @@ -1,15 +1,13 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using System.IO; - - using Xunit; - - using ImageSharp.Formats; - using ImageSharp.Formats.Tiff; +using System.IO; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class TiffEncoderHeaderTests { [Fact] @@ -39,4 +37,4 @@ namespace SixLabors.ImageSharp.Tests } } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderIfdTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderIfdTests.cs index 3b9bce4935..1dfa7dc16f 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderIfdTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderIfdTests.cs @@ -1,18 +1,16 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; + +namespace SixLabors.ImageSharp.Tests.Formats.Tiff { - using System; - using System.IO; - using System.Linq; - using Xunit; - - using ImageSharp.Formats; - using ImageSharp.Formats.Tiff; - - using System.Collections.Generic; - + [Trait("Category", "Tiff")] public class TiffEncoderIfdTests { [Fact] @@ -294,4 +292,4 @@ namespace SixLabors.ImageSharp.Tests } } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderMetadataTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderMetadataTests.cs index dd52317a99..ec90381ab8 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderMetadataTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffEncoderMetadataTests.cs @@ -1,19 +1,14 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. +using System.Collections.Generic; +using SixLabors.ImageSharp.Formats.Tiff; using SixLabors.ImageSharp.PixelFormats; +using Xunit; -namespace SixLabors.ImageSharp.Tests +namespace SixLabors.ImageSharp.Tests.Formats.Tiff { - using Xunit; - - using ImageSharp.Formats; - using ImageSharp.Formats.Tiff; - using System.Collections.Generic; - - using SixLabors.ImageSharp.Metadata; - using SixLabors.ImageSharp.Metadata.Profiles.Exif; - + [Trait("Category", "Tiff")] public class TiffEncoderMetadataTests { public static object[][] BaselineMetadataValues = new[] { new object[] { TiffTags.Artist, TiffMetadataNames.Artist, "My Artist Name" }, diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffFormatTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffFormatTests.cs index e3d51e76d1..312c843083 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffFormatTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffFormatTests.cs @@ -1,12 +1,12 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using Xunit; - - using ImageSharp.Formats; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class TiffFormatTests { [Fact] diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffIfd/TiffIfdEntryCreatorTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffIfd/TiffIfdEntryCreatorTests.cs index d5ce048ea0..c3c108e9fe 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffIfd/TiffIfdEntryCreatorTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffIfd/TiffIfdEntryCreatorTests.cs @@ -1,17 +1,15 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using System; - using System.Collections.Generic; - using System.Linq; - using Xunit; - - using ImageSharp.Formats.Tiff; - - using SixLabors.ImageSharp.Metadata.Profiles.Exif; +using System; +using System.Collections.Generic; +using System.Linq; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class TiffIfdEntryCreatorTests { [Theory] diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffIfd/TiffIfdEntryTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffIfd/TiffIfdEntryTests.cs index 105eab250b..f5f44b3228 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffIfd/TiffIfdEntryTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffIfd/TiffIfdEntryTests.cs @@ -1,12 +1,12 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using Xunit; - - using ImageSharp.Formats.Tiff; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class TiffIfdEntryTests { [Fact] @@ -20,4 +20,4 @@ namespace SixLabors.ImageSharp.Tests Assert.Equal(new byte[] { 2, 4, 6, 8 }, entry.Value); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffIfd/TiffIfdTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffIfd/TiffIfdTests.cs index b1374a0aed..88ae289615 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffIfd/TiffIfdTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffIfd/TiffIfdTests.cs @@ -1,12 +1,12 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using Xunit; - - using ImageSharp.Formats.Tiff; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class TiffIfdTests { [Fact] @@ -90,4 +90,4 @@ namespace SixLabors.ImageSharp.Tests Assert.Equal(0, entry.Tag); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/TiffImageFormatDetectorTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/TiffImageFormatDetectorTests.cs index 89de19fdab..7d8cad56bf 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/TiffImageFormatDetectorTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/TiffImageFormatDetectorTests.cs @@ -1,13 +1,13 @@ -// Copyright (c) Six Labors. +// Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using System.Linq; - using Xunit; - - using ImageSharp.Formats; +using System.Linq; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class TiffImageFormatDetectorTests { public static object[][] IsLittleEndianValues = new[] { new object[] { false }, diff --git a/tests/ImageSharp.Tests/Formats/Tiff/Utils/SubStreamTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/Utils/SubStreamTests.cs index 2b57a5a703..dbb053b904 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/Utils/SubStreamTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/Utils/SubStreamTests.cs @@ -1,14 +1,14 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using System; - using System.IO; - using Xunit; - - using ImageSharp.Formats.Tiff; +using System; +using System.IO; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class SubStreamTests { [Fact] @@ -323,4 +323,4 @@ namespace SixLabors.ImageSharp.Tests Assert.Throws(() => stream.SetLength(5)); } } -} \ No newline at end of file +} diff --git a/tests/ImageSharp.Tests/Formats/Tiff/Utils/TiffWriterTests.cs b/tests/ImageSharp.Tests/Formats/Tiff/Utils/TiffWriterTests.cs index f18611acf0..a3e865519c 100644 --- a/tests/ImageSharp.Tests/Formats/Tiff/Utils/TiffWriterTests.cs +++ b/tests/ImageSharp.Tests/Formats/Tiff/Utils/TiffWriterTests.cs @@ -1,13 +1,13 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. -namespace SixLabors.ImageSharp.Tests -{ - using System.IO; - using Xunit; - - using ImageSharp.Formats.Tiff; +using System.IO; +using SixLabors.ImageSharp.Formats.Tiff; +using Xunit; +namespace SixLabors.ImageSharp.Tests.Formats.Tiff +{ + [Trait("Category", "Tiff")] public class TiffWriterTests { [Fact] @@ -129,4 +129,4 @@ namespace SixLabors.ImageSharp.Tests 0x44, 0x44, 0x44, 0x44 }, stream.ToArray()); } } -} \ No newline at end of file +}