// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats;
namespace SixLabors.ImageSharp.Tests;
///
/// You can't mock the "DetectFormat" method due to the ReadOnlySpan{byte} parameter.
///
public class MockImageFormatDetector : IImageFormatDetector
{
private IImageFormat localImageFormatMock;
public MockImageFormatDetector(IImageFormat imageFormat)
{
this.localImageFormatMock = imageFormat;
}
public int HeaderSize => 1;
public IImageFormat DetectFormat(ReadOnlySpan header)
{
return this.localImageFormatMock;
}
}