From 2457d20bfc0187ceb2648d2a02abcb52ecd8d5a0 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 062bcb229..3ed61aa6c 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 fb0c93a60..cee66694b 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 2c8e222e8..98efa52cd 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 117ad2a9c..611f99538 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 4347b0dae..e96dba207 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 ea93258c6..ba52e4266 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 8e986f847..f134376ff 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 319b1465b..4c0d5dff8 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 d07e5319f..2fa7e7925 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 e4acdad14..1ee5c89cc 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 15e2bb2fb..f7e6f7a99 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 a25882302..a610df814 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 faf61f872..66868d3dc 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 af853d6c9..de4d5f46d 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 39fc3e605..8e0d81fa4 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 707dad1e0..3888f6bf9 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 113f6928e..20fd53f41 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 895a8af92..4f6bef0cf 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 8c40a7bdd..da48086bb 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 810e8e731..cc025a452 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 6523a9a19..5683e4752 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 054368e21..5334e2984 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 d038b69cd..275da7da1 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 b39cecb18..f8d41cb86 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 0b018dfc5..97ace8bed 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 8e40015a5..52f321a47 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 ecc510461..b36d4e02f 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 e1086e735..2af1b5225 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 3b9bce493..1dfa7dc16 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 dd52317a9..ec90381ab 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 e3d51e76d..312c84308 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 d5ce048ea..c3c108e9f 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 105eab250..f5f44b322 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 b1374a0ae..88ae28961 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 89de19fda..7d8cad56b 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 2b57a5a70..dbb053b90 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 f18611acf..a3e865519 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 +}