File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
tests/ImageSharp.Tests/Processing/Transforms Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,12 @@ public class SwizzleTests : BaseImageOperationsExtensionTest
1111 {
1212 private struct InvertXAndYSwizzler : ISwizzler
1313 {
14- public Size DestinationSize => new Size ( 10 , 10 ) ;
14+ public InvertXAndYSwizzler ( Size sourceSize )
15+ {
16+ this . DestinationSize = new Size ( sourceSize . Height , sourceSize . Width ) ;
17+ }
18+
19+ public Size DestinationSize { get ; }
1520
1621 public void Transform ( Point point , out Point newPoint )
1722 => newPoint = new Point ( point . Y , point . X ) ;
@@ -23,13 +28,13 @@ public void InvertXAndYSwizzlerSetsCorrectSizes()
2328 int width = 5 ;
2429 int height = 10 ;
2530
26- this . operations . Swizzle ( default ( InvertXAndYSwizzler ) ) ;
31+ this . operations . Swizzle ( new InvertXAndYSwizzler ( new Size ( width , height ) ) ) ;
2732 SwizzleProcessor < InvertXAndYSwizzler > processor = this . Verify < SwizzleProcessor < InvertXAndYSwizzler > > ( ) ;
2833
2934 Assert . Equal ( processor . Swizzler . DestinationSize . Width , height ) ;
3035 Assert . Equal ( processor . Swizzler . DestinationSize . Height , width ) ;
3136
32- this . operations . Swizzle ( default ( InvertXAndYSwizzler ) ) ;
37+ this . operations . Swizzle ( new InvertXAndYSwizzler ( processor . Swizzler . DestinationSize ) ) ;
3338 SwizzleProcessor < InvertXAndYSwizzler > processor2 = this . Verify < SwizzleProcessor < InvertXAndYSwizzler > > ( 1 ) ;
3439
3540 Assert . Equal ( processor2 . Swizzler . DestinationSize . Width , width ) ;
You can’t perform that action at this time.
0 commit comments