Browse Source

Fix warning

pull/1574/head
Brian Popow 6 years ago
parent
commit
a446546af0
  1. 16
      tests/ImageSharp.Tests/Drawing/DrawImageExtensionsTests.cs

16
tests/ImageSharp.Tests/Drawing/DrawImageExtensionsTests.cs

@ -1,17 +1,10 @@
// Copyright (c) Six Labors and contributors. // Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System;
using System.Linq;
using Moq;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Formats.Png;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing; using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Processing.Processors.Drawing; using SixLabors.ImageSharp.Processing.Processors.Drawing;
using SixLabors.ImageSharp.Tests.Processing; using SixLabors.ImageSharp.Tests.Processing;
using SixLabors.ImageSharp.Tests.TestUtilities.ImageComparison;
using Xunit; using Xunit;
@ -19,7 +12,6 @@ namespace SixLabors.ImageSharp.Tests.Drawing
{ {
public class DrawImageExtensionsTests : BaseImageOperationsExtensionTest public class DrawImageExtensionsTests : BaseImageOperationsExtensionTest
{ {
[Fact] [Fact]
public void DrawImage_OpacityOnly_VerifyGraphicOptionsTakenFromContext() public void DrawImage_OpacityOnly_VerifyGraphicOptionsTakenFromContext()
{ {
@ -28,7 +20,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
this.options.ColorBlendingMode = PixelColorBlendingMode.Screen; this.options.ColorBlendingMode = PixelColorBlendingMode.Screen;
this.operations.DrawImage(null, 0.5f); this.operations.DrawImage(null, 0.5f);
var dip = this.Verify<DrawImageProcessor>(); DrawImageProcessor dip = this.Verify<DrawImageProcessor>();
Assert.Equal(0.5, dip.Opacity); Assert.Equal(0.5, dip.Opacity);
Assert.Equal(this.options.AlphaCompositionMode, dip.AlphaCompositionMode); Assert.Equal(this.options.AlphaCompositionMode, dip.AlphaCompositionMode);
@ -43,7 +35,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
this.options.ColorBlendingMode = PixelColorBlendingMode.Screen; this.options.ColorBlendingMode = PixelColorBlendingMode.Screen;
this.operations.DrawImage(null, PixelColorBlendingMode.Multiply, 0.5f); this.operations.DrawImage(null, PixelColorBlendingMode.Multiply, 0.5f);
var dip = this.Verify<DrawImageProcessor>(); DrawImageProcessor dip = this.Verify<DrawImageProcessor>();
Assert.Equal(0.5, dip.Opacity); Assert.Equal(0.5, dip.Opacity);
Assert.Equal(this.options.AlphaCompositionMode, dip.AlphaCompositionMode); Assert.Equal(this.options.AlphaCompositionMode, dip.AlphaCompositionMode);
@ -58,7 +50,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
this.options.ColorBlendingMode = PixelColorBlendingMode.Screen; this.options.ColorBlendingMode = PixelColorBlendingMode.Screen;
this.operations.DrawImage(null, Point.Empty, 0.5f); this.operations.DrawImage(null, Point.Empty, 0.5f);
var dip = this.Verify<DrawImageProcessor>(); DrawImageProcessor dip = this.Verify<DrawImageProcessor>();
Assert.Equal(0.5, dip.Opacity); Assert.Equal(0.5, dip.Opacity);
Assert.Equal(this.options.AlphaCompositionMode, dip.AlphaCompositionMode); Assert.Equal(this.options.AlphaCompositionMode, dip.AlphaCompositionMode);
@ -73,7 +65,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
this.options.ColorBlendingMode = PixelColorBlendingMode.Screen; this.options.ColorBlendingMode = PixelColorBlendingMode.Screen;
this.operations.DrawImage(null, Point.Empty, PixelColorBlendingMode.Multiply, 0.5f); this.operations.DrawImage(null, Point.Empty, PixelColorBlendingMode.Multiply, 0.5f);
var dip = this.Verify<DrawImageProcessor>(); DrawImageProcessor dip = this.Verify<DrawImageProcessor>();
Assert.Equal(0.5, dip.Opacity); Assert.Equal(0.5, dip.Opacity);
Assert.Equal(this.options.AlphaCompositionMode, dip.AlphaCompositionMode); Assert.Equal(this.options.AlphaCompositionMode, dip.AlphaCompositionMode);

Loading…
Cancel
Save