Browse Source

the folder TestUtilities is no longer a namespace provider

af/merge-core
antonfirsov 9 years ago
parent
commit
799c00a639
  1. 6
      tests/ImageSharp.Tests/Formats/Jpg/JpegTests.cs
  2. 2
      tests/ImageSharp.Tests/Image/PixelAccessorTests.cs
  3. 2
      tests/ImageSharp.Tests/TestUtilities/FlagsHelper.cs
  4. 13
      tests/ImageSharp.Tests/TestUtilities/GenericFactory.cs
  5. 4
      tests/ImageSharp.Tests/TestUtilities/ImageDataAttributeBase.cs
  6. 2
      tests/ImageSharp.Tests/TestUtilities/ImagingTestCaseUtility.cs
  7. 2
      tests/ImageSharp.Tests/TestUtilities/PixelTypes.cs
  8. 2
      tests/ImageSharp.Tests/TestUtilities/TestImageProvider.cs
  9. 2
      tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs
  10. 2
      tests/ImageSharp.Tests/TestUtilities/Tests/TestImageProviderTests.cs
  11. 2
      tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs
  12. 2
      tests/ImageSharp.Tests/TestUtilities/WithBlankImageAttribute.cs
  13. 2
      tests/ImageSharp.Tests/TestUtilities/WithFileAttribute.cs
  14. 2
      tests/ImageSharp.Tests/TestUtilities/WithFileCollectionAttribute.cs
  15. 3
      tests/ImageSharp.Tests/TestUtilities/WithMemberFactoryAttribute.cs
  16. 2
      tests/ImageSharp.Tests/TestUtilities/WithSolidFilledImagesAttribute.cs

6
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<string> AllJpegFiles => TestImages.Jpeg.All;

2
tests/ImageSharp.Tests/Image/PixelAccessorTests.cs

@ -8,8 +8,6 @@ namespace ImageSharp.Tests
using System;
using System.Numerics;
using ImageSharp.Tests.TestUtilities;
using Xunit;
/// <summary>

2
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.
// </copyright>
namespace ImageSharp.Tests.TestUtilities
namespace ImageSharp.Tests
{
using System;
using System.Collections.Generic;

13
tests/ImageSharp.Tests/TestUtilities/GenericFactory.cs

@ -3,12 +3,13 @@
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Tests.TestUtilities
namespace ImageSharp.Tests
{
using System;
/// <summary>
/// Utility class to create specialized subclasses generic classes (eg. <see cref="Image"/>)
/// Utility class to create specialized subclasses of generic classes (eg. <see cref="Image"/>)
/// Used as parameter for <see cref="WithMemberFactoryAttribute"/> -based factory methods
/// </summary>
public class GenericFactory<TColor>
where TColor : struct, IPackedPixel, IEquatable<TColor>
@ -22,11 +23,6 @@ namespace ImageSharp.Tests.TestUtilities
{
return new Image<TColor>(bytes);
}
public virtual PixelArea<TColor> CreatePixelArea(int width, int height, ComponentOrder componentOrder)
{
return new PixelArea<TColor>(width, height, componentOrder);
}
}
public class DefaultImageClassSpecificFactory : GenericFactory<Color>
@ -34,8 +30,5 @@ namespace ImageSharp.Tests.TestUtilities
public override Image<Color> CreateImage(byte[] bytes) => new Image(bytes);
public override Image<Color> CreateImage(int width, int height) => new Image(width, height);
public override PixelArea<Color> CreatePixelArea(int width, int height, ComponentOrder componentOrder)
=> new PixelArea<Color>(width, height, componentOrder);
}
}

4
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.
// </copyright>
namespace ImageSharp.Tests.TestUtilities
namespace ImageSharp.Tests
{
using System;
using System.Collections.Generic;
@ -13,7 +13,7 @@ namespace ImageSharp.Tests.TestUtilities
using Xunit.Sdk;
/// <summary>
/// Base class for Theory Data attributes which pass an instance of <see cref="TestImageProvider{TColor}"/> to the test cases.
/// Base class for Theory Data attributes which pass an instance of <see cref="TestImageProvider{TColor}"/> to the test case.
/// </summary>
public abstract class ImageDataAttributeBase : DataAttribute
{

2
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.
// </copyright>
namespace ImageSharp.Tests.TestUtilities
namespace ImageSharp.Tests
{
using System;
using System.IO;

2
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.
// </copyright>
namespace ImageSharp.Tests.TestUtilities
namespace ImageSharp.Tests
{
using System;

2
tests/ImageSharp.Tests/TestUtilities/TestImageProvider.cs

@ -3,7 +3,7 @@
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Tests.TestUtilities
namespace ImageSharp.Tests
{
using System;
using System.Collections.Concurrent;

2
tests/ImageSharp.Tests/TestUtilities/TestUtilityExtensions.cs

@ -3,7 +3,7 @@
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Tests.TestUtilities
namespace ImageSharp.Tests
{
using System;
using System.Collections.Generic;

2
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;

2
tests/ImageSharp.Tests/TestUtilities/Tests/TestUtilityExtensionsTests.cs

@ -4,7 +4,7 @@
// </copyright>
// ReSharper disable InconsistentNaming
namespace ImageSharp.Tests.TestUtilities.Tests
namespace ImageSharp.Tests.Tests
{
using System;
using System.Collections.Generic;

2
tests/ImageSharp.Tests/TestUtilities/WithBlankImageAttribute.cs

@ -3,7 +3,7 @@
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Tests.TestUtilities
namespace ImageSharp.Tests
{
using System;
using System.Reflection;

2
tests/ImageSharp.Tests/TestUtilities/WithFileAttribute.cs

@ -3,7 +3,7 @@
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Tests.TestUtilities
namespace ImageSharp.Tests
{
using System;
using System.Reflection;

2
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.
// </copyright>
namespace ImageSharp.Tests.TestUtilities
namespace ImageSharp.Tests
{
using System;
using System.Collections.Generic;

3
tests/ImageSharp.Tests/TestUtilities/WithMemberFactoryAttribute.cs

@ -3,7 +3,7 @@
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Tests.TestUtilities
namespace ImageSharp.Tests
{
using System;
using System.Linq;
@ -12,6 +12,7 @@ namespace ImageSharp.Tests.TestUtilities
/// <summary>
/// Triggers passing <see cref="TestImageProvider{TColor}"/> instances which return the image produced by the given test class member method
/// <see cref="TestImageProvider{TColor}"/> instances will be passed for each the pixel format defined by the pixelTypes parameter
/// The parameter of the factory method must be a <see cref="GenericFactory{TColor}"/> instance
/// </summary>
public class WithMemberFactoryAttribute : ImageDataAttributeBase
{

2
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.
// </copyright>
namespace ImageSharp.Tests.TestUtilities
namespace ImageSharp.Tests
{
using System;
using System.Reflection;

Loading…
Cancel
Save