mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
// Copyright (c) Six Labors.
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
using SixLabors.ImageSharp.Processing;
|
|
using SixLabors.ImageSharp.Processing.Processors.Effects;
|
|
using Xunit;
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Processing.Effects
|
|
{
|
|
public class PixelateTest : BaseImageOperationsExtensionTest
|
|
{
|
|
[Fact]
|
|
public void Pixelate_PixelateProcessorDefaultsSet()
|
|
{
|
|
this.operations.Pixelate();
|
|
var processor = this.Verify<PixelateProcessor>();
|
|
|
|
Assert.Equal(4, processor.Size);
|
|
}
|
|
|
|
[Fact]
|
|
public void Pixelate_Size_PixelateProcessorDefaultsSet()
|
|
{
|
|
this.operations.Pixelate(12);
|
|
var processor = this.Verify<PixelateProcessor>();
|
|
|
|
Assert.Equal(12, processor.Size);
|
|
}
|
|
|
|
[Fact]
|
|
public void Pixelate_Size_rect_PixelateProcessorDefaultsSet()
|
|
{
|
|
this.operations.Pixelate(23, this.rect);
|
|
var processor = this.Verify<PixelateProcessor>(this.rect);
|
|
|
|
Assert.Equal(23, processor.Size);
|
|
}
|
|
}
|
|
}
|