From 799c00a639879b8b03c88b644b7bff7afcb68a46 Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Fri, 23 Dec 2016 05:40:51 +0100 Subject: [PATCH] the folder TestUtilities is no longer a namespace provider --- tests/ImageSharp.Tests/Formats/Jpg/JpegTests.cs | 6 ++---- tests/ImageSharp.Tests/Image/PixelAccessorTests.cs | 2 -- tests/ImageSharp.Tests/TestUtilities/FlagsHelper.cs | 2 +- .../TestUtilities/GenericFactory.cs | 13 +++---------- .../TestUtilities/ImageDataAttributeBase.cs | 4 ++-- .../TestUtilities/ImagingTestCaseUtility.cs | 2 +- tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs | 2 +- .../TestUtilities/TestImageProvider.cs | 2 +- .../TestUtilities/TestUtilityExtensions.cs | 2 +- .../TestUtilities/Tests/TestImageProviderTests.cs | 2 +- .../Tests/TestUtilityExtensionsTests.cs | 2 +- .../TestUtilities/WithBlankImageAttribute.cs | 2 +- .../TestUtilities/WithFileAttribute.cs | 2 +- .../TestUtilities/WithFileCollectionAttribute.cs | 2 +- .../TestUtilities/WithMemberFactoryAttribute.cs | 3 ++- .../TestUtilities/WithSolidFilledImagesAttribute.cs | 2 +- 16 files changed, 20 insertions(+), 30 deletions(-) diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegTests.cs index d9dafe81c..7cbd6cedb 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegTests.cs @@ -6,10 +6,8 @@ using ImageSharp.Formats; using Xunit; using Xunit.Abstractions; -namespace ImageSharp.Tests.Formats.Jpg +namespace ImageSharp.Tests { - using ImageSharp.Tests.TestUtilities; - public class JpegTests { @@ -19,7 +17,7 @@ namespace ImageSharp.Tests.Formats.Jpg public JpegTests(ITestOutputHelper output) { - Output = output; + this.Output = output; } public static IEnumerable AllJpegFiles => TestImages.Jpeg.All; diff --git a/tests/ImageSharp.Tests/Image/PixelAccessorTests.cs b/tests/ImageSharp.Tests/Image/PixelAccessorTests.cs index 70573e4f6..fbba55815 100644 --- a/tests/ImageSharp.Tests/Image/PixelAccessorTests.cs +++ b/tests/ImageSharp.Tests/Image/PixelAccessorTests.cs @@ -8,8 +8,6 @@ namespace ImageSharp.Tests using System; using System.Numerics; - using ImageSharp.Tests.TestUtilities; - using Xunit; /// diff --git a/tests/ImageSharp.Tests/TestUtilities/FlagsHelper.cs b/tests/ImageSharp.Tests/TestUtilities/FlagsHelper.cs index 858989b20..6c2589b82 100644 --- a/tests/ImageSharp.Tests/TestUtilities/FlagsHelper.cs +++ b/tests/ImageSharp.Tests/TestUtilities/FlagsHelper.cs @@ -2,7 +2,7 @@ // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // -namespace ImageSharp.Tests.TestUtilities +namespace ImageSharp.Tests { using System; using System.Collections.Generic; diff --git a/tests/ImageSharp.Tests/TestUtilities/GenericFactory.cs b/tests/ImageSharp.Tests/TestUtilities/GenericFactory.cs index 6b4d8ecc7..92fe8e16c 100644 --- a/tests/ImageSharp.Tests/TestUtilities/GenericFactory.cs +++ b/tests/ImageSharp.Tests/TestUtilities/GenericFactory.cs @@ -3,12 +3,13 @@ // Licensed under the Apache License, Version 2.0. // -namespace ImageSharp.Tests.TestUtilities +namespace ImageSharp.Tests { using System; /// - /// Utility class to create specialized subclasses generic classes (eg. ) + /// Utility class to create specialized subclasses of generic classes (eg. ) + /// Used as parameter for -based factory methods /// public class GenericFactory where TColor : struct, IPackedPixel, IEquatable @@ -22,11 +23,6 @@ namespace ImageSharp.Tests.TestUtilities { return new Image(bytes); } - - public virtual PixelArea CreatePixelArea(int width, int height, ComponentOrder componentOrder) - { - return new PixelArea(width, height, componentOrder); - } } public class DefaultImageClassSpecificFactory : GenericFactory @@ -34,8 +30,5 @@ namespace ImageSharp.Tests.TestUtilities public override Image CreateImage(byte[] bytes) => new Image(bytes); public override Image CreateImage(int width, int height) => new Image(width, height); - - public override PixelArea CreatePixelArea(int width, int height, ComponentOrder componentOrder) - => new PixelArea(width, height, componentOrder); } } \ No newline at end of file diff --git a/tests/ImageSharp.Tests/TestUtilities/ImageDataAttributeBase.cs b/tests/ImageSharp.Tests/TestUtilities/ImageDataAttributeBase.cs index 094a66149..18600085d 100644 --- a/tests/ImageSharp.Tests/TestUtilities/ImageDataAttributeBase.cs +++ b/tests/ImageSharp.Tests/TestUtilities/ImageDataAttributeBase.cs @@ -2,7 +2,7 @@ // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // -namespace ImageSharp.Tests.TestUtilities +namespace ImageSharp.Tests { using System; using System.Collections.Generic; @@ -13,7 +13,7 @@ namespace ImageSharp.Tests.TestUtilities using Xunit.Sdk; /// - /// Base class for Theory Data attributes which pass an instance of to the test cases. + /// Base class for Theory Data attributes which pass an instance of to the test case. /// public abstract class ImageDataAttributeBase : DataAttribute { diff --git a/tests/ImageSharp.Tests/TestUtilities/ImagingTestCaseUtility.cs b/tests/ImageSharp.Tests/TestUtilities/ImagingTestCaseUtility.cs index 8225e08ef..e2b885034 100644 --- a/tests/ImageSharp.Tests/TestUtilities/ImagingTestCaseUtility.cs +++ b/tests/ImageSharp.Tests/TestUtilities/ImagingTestCaseUtility.cs @@ -2,7 +2,7 @@ // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // -namespace ImageSharp.Tests.TestUtilities +namespace ImageSharp.Tests { using System; using System.IO; diff --git a/tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs b/tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs index 5ddc8cbcc..75b9030ed 100644 --- a/tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs +++ b/tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs @@ -2,7 +2,7 @@ // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // -namespace ImageSharp.Tests.TestUtilities +namespace ImageSharp.Tests { using System; diff --git a/tests/ImageSharp.Tests/TestUtilities/TestImageProvider.cs b/tests/ImageSharp.Tests/TestUtilities/TestImageProvider.cs index 5c58751ea..9d17c32e6 100644 --- a/tests/ImageSharp.Tests/TestUtilities/TestImageProvider.cs +++ b/tests/ImageSharp.Tests/TestUtilities/TestImageProvider.cs @@ -3,7 +3,7 @@ // Licensed under the Apache License, Version 2.0. // -namespace ImageSharp.Tests.TestUtilities +namespace ImageSharp.Tests { using System; using System.Collections.Concurrent; diff --git a/tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs b/tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs index 670db96d9..3be70dc1f 100644 --- a/tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs +++ b/tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs @@ -3,7 +3,7 @@ // Licensed under the Apache License, Version 2.0. // -namespace ImageSharp.Tests.TestUtilities +namespace ImageSharp.Tests { using System; using System.Collections.Generic; diff --git a/tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs b/tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs index 8a7985b38..ab491c38f 100644 --- a/tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs +++ b/tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs @@ -5,7 +5,7 @@ // ReSharper disable InconsistentNaming -namespace ImageSharp.Tests.TestUtilities.Tests +namespace ImageSharp.Tests.Tests { using System; diff --git a/tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs b/tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs index 7d8d0cc6b..9375aabaa 100644 --- a/tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs +++ b/tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs @@ -4,7 +4,7 @@ // // ReSharper disable InconsistentNaming -namespace ImageSharp.Tests.TestUtilities.Tests +namespace ImageSharp.Tests.Tests { using System; using System.Collections.Generic; diff --git a/tests/ImageSharp.Tests/TestUtilities/WithBlankImageAttribute.cs b/tests/ImageSharp.Tests/TestUtilities/WithBlankImageAttribute.cs index 9a4b03636..e1f8f4c55 100644 --- a/tests/ImageSharp.Tests/TestUtilities/WithBlankImageAttribute.cs +++ b/tests/ImageSharp.Tests/TestUtilities/WithBlankImageAttribute.cs @@ -3,7 +3,7 @@ // Licensed under the Apache License, Version 2.0. // -namespace ImageSharp.Tests.TestUtilities +namespace ImageSharp.Tests { using System; using System.Reflection; diff --git a/tests/ImageSharp.Tests/TestUtilities/WithFileAttribute.cs b/tests/ImageSharp.Tests/TestUtilities/WithFileAttribute.cs index 49cbeab5e..617a9a237 100644 --- a/tests/ImageSharp.Tests/TestUtilities/WithFileAttribute.cs +++ b/tests/ImageSharp.Tests/TestUtilities/WithFileAttribute.cs @@ -3,7 +3,7 @@ // Licensed under the Apache License, Version 2.0. // -namespace ImageSharp.Tests.TestUtilities +namespace ImageSharp.Tests { using System; using System.Reflection; diff --git a/tests/ImageSharp.Tests/TestUtilities/WithFileCollectionAttribute.cs b/tests/ImageSharp.Tests/TestUtilities/WithFileCollectionAttribute.cs index bd80ae66b..bca69eea7 100644 --- a/tests/ImageSharp.Tests/TestUtilities/WithFileCollectionAttribute.cs +++ b/tests/ImageSharp.Tests/TestUtilities/WithFileCollectionAttribute.cs @@ -2,7 +2,7 @@ // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // -namespace ImageSharp.Tests.TestUtilities +namespace ImageSharp.Tests { using System; using System.Collections.Generic; diff --git a/tests/ImageSharp.Tests/TestUtilities/WithMemberFactoryAttribute.cs b/tests/ImageSharp.Tests/TestUtilities/WithMemberFactoryAttribute.cs index 598b01b45..e658e817d 100644 --- a/tests/ImageSharp.Tests/TestUtilities/WithMemberFactoryAttribute.cs +++ b/tests/ImageSharp.Tests/TestUtilities/WithMemberFactoryAttribute.cs @@ -3,7 +3,7 @@ // Licensed under the Apache License, Version 2.0. // -namespace ImageSharp.Tests.TestUtilities +namespace ImageSharp.Tests { using System; using System.Linq; @@ -12,6 +12,7 @@ namespace ImageSharp.Tests.TestUtilities /// /// Triggers passing instances which return the image produced by the given test class member method /// instances will be passed for each the pixel format defined by the pixelTypes parameter + /// The parameter of the factory method must be a instance /// public class WithMemberFactoryAttribute : ImageDataAttributeBase { diff --git a/tests/ImageSharp.Tests/TestUtilities/WithSolidFilledImagesAttribute.cs b/tests/ImageSharp.Tests/TestUtilities/WithSolidFilledImagesAttribute.cs index 864ac80b3..46f18e08c 100644 --- a/tests/ImageSharp.Tests/TestUtilities/WithSolidFilledImagesAttribute.cs +++ b/tests/ImageSharp.Tests/TestUtilities/WithSolidFilledImagesAttribute.cs @@ -2,7 +2,7 @@ // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // -namespace ImageSharp.Tests.TestUtilities +namespace ImageSharp.Tests { using System; using System.Reflection;