Browse Source

fix broken tests

af/merge-core
Scott Williams 9 years ago
parent
commit
440eab7bf4
  1. 2
      tests/ImageSharp.Tests/TestUtilities/ImageProviders/BlankProvider.cs
  2. 4
      tests/ImageSharp.Tests/TestUtilities/ImageProviders/FileProvider.cs
  3. 2
      tests/ImageSharp.Tests/TestUtilities/ImageProviders/TestImageProvider.cs

2
tests/ImageSharp.Tests/TestUtilities/ImageProviders/BlankProvider.cs

@ -11,7 +11,7 @@ namespace ImageSharp.Tests
public abstract partial class TestImageProvider<TColor>
where TColor : struct, IPixel<TColor>
{
private class BlankProvider : TestImageProvider<TColor>
private class BlankProvider : TestImageProvider<TColor>, IXunitSerializable
{
public BlankProvider(int width, int height)
{

4
tests/ImageSharp.Tests/TestUtilities/ImageProviders/FileProvider.cs

@ -55,14 +55,14 @@ namespace ImageSharp.Tests
return this.Factory.CreateImage(cachedImage);
}
public void Deserialize(IXunitSerializationInfo info)
public override void Deserialize(IXunitSerializationInfo info)
{
this.filePath = info.GetValue<string>("path");
base.Deserialize(info); // must be called last
}
public void Serialize(IXunitSerializationInfo info)
public override void Serialize(IXunitSerializationInfo info)
{
base.Serialize(info);
info.AddValue("path", this.filePath);

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

@ -13,7 +13,7 @@ namespace ImageSharp.Tests
/// Provides <see cref="Image{TColor}" /> instances for parametric unit tests.
/// </summary>
/// <typeparam name="TColor">The pixel format of the image</typeparam>
public abstract partial class TestImageProvider<TColor> : IXunitSerializable
public abstract partial class TestImageProvider<TColor>
where TColor : struct, IPixel<TColor>
{
public PixelTypes PixelType { get; private set; } = typeof(TColor).GetPixelType();

Loading…
Cancel
Save