// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // namespace ImageSharp.Tests { using System.IO; using Xunit; public class FlipTests : FileTestBase { public static readonly TheoryData FlipValues = new TheoryData { { FlipType.None }, { FlipType.Vertical }, { FlipType.Horizontal }, }; [Theory] [MemberData("FlipValues")] public void ImageShouldFlip(FlipType flipType) { string path = CreateOutputDirectory("Flip"); foreach (TestFile file in Files) { string filename = file.GetFileName(flipType); Image image = file.CreateImage(); using (FileStream output = File.OpenWrite($"{path}/{filename}")) { image.Flip(flipType) .Save(output); } } } } }