diff --git a/tests/ImageProcessorCore.Tests/Formats/BitmapTests.cs b/tests/ImageProcessorCore.Tests/Formats/BitmapTests.cs index aded05692d..6ff3a0f713 100644 --- a/tests/ImageProcessorCore.Tests/Formats/BitmapTests.cs +++ b/tests/ImageProcessorCore.Tests/Formats/BitmapTests.cs @@ -26,8 +26,6 @@ namespace ImageProcessorCore.Tests { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); - Image image = new Image(stream); string encodeFilename = "TestOutput/Encode/Bitmap/" + "24-" + Path.GetFileNameWithoutExtension(file) + ".bmp"; @@ -42,9 +40,6 @@ namespace ImageProcessorCore.Tests { image.Save(output, new BmpEncoder { BitsPerPixel = BmpBitsPerPixel.Pixel32 }); } - - - Trace.WriteLine($"{file} : {watch.ElapsedMilliseconds}ms"); } } } diff --git a/tests/ImageProcessorCore.Tests/Formats/EncoderDecoderTests.cs b/tests/ImageProcessorCore.Tests/Formats/EncoderDecoderTests.cs index 0b2522d750..b26ef68093 100644 --- a/tests/ImageProcessorCore.Tests/Formats/EncoderDecoderTests.cs +++ b/tests/ImageProcessorCore.Tests/Formats/EncoderDecoderTests.cs @@ -29,13 +29,9 @@ namespace ImageProcessorCore.Tests { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); - Image image = new Image(stream); string filename = "TestOutput/ToString/" + Path.GetFileNameWithoutExtension(file) + ".txt"; File.WriteAllText(filename, image.ToString()); - - Trace.WriteLine($"{watch.ElapsedMilliseconds}ms"); } } } @@ -52,8 +48,6 @@ namespace ImageProcessorCore.Tests { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); - Image image = new Image(stream); string encodeFilename = "TestOutput/Encode/" + Path.GetFileName(file); @@ -61,8 +55,6 @@ namespace ImageProcessorCore.Tests { image.Save(output); } - - Trace.WriteLine($"{file} : {watch.ElapsedMilliseconds}ms"); } } } diff --git a/tests/ImageProcessorCore.Tests/Processors/Filters/FilterTests.cs b/tests/ImageProcessorCore.Tests/Processors/Filters/FilterTests.cs index 5632fe5a1b..e9414393f3 100644 --- a/tests/ImageProcessorCore.Tests/Processors/Filters/FilterTests.cs +++ b/tests/ImageProcessorCore.Tests/Processors/Filters/FilterTests.cs @@ -1,4 +1,8 @@ - +// +// Copyright (c) James Jackson-South and contributors. +// Licensed under the Apache License, Version 2.0. +// + namespace ImageProcessorCore.Tests { using System.Diagnostics; @@ -7,7 +11,6 @@ namespace ImageProcessorCore.Tests using Processors; using Xunit; - public class FilterTests : FileTestBase { public static readonly TheoryData Filters = new TheoryData @@ -79,8 +82,6 @@ namespace ImageProcessorCore.Tests image.Process(processor).Save(output); processor.OnProgress -= this.ProgressUpdate; } - - Trace.WriteLine($"{ name }: { watch.ElapsedMilliseconds}ms"); } } } diff --git a/tests/ImageProcessorCore.Tests/Processors/Samplers/SamplerTests.cs b/tests/ImageProcessorCore.Tests/Processors/Samplers/SamplerTests.cs index aff221c014..b5f98a73f2 100644 --- a/tests/ImageProcessorCore.Tests/Processors/Samplers/SamplerTests.cs +++ b/tests/ImageProcessorCore.Tests/Processors/Samplers/SamplerTests.cs @@ -1,6 +1,10 @@ -namespace ImageProcessorCore.Tests +// +// Copyright (c) James Jackson-South and contributors. +// Licensed under the Apache License, Version 2.0. +// + +namespace ImageProcessorCore.Tests { - using System.Diagnostics; using System.IO; using Processors; @@ -57,7 +61,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); Image image = new Image(stream); string filename = Path.GetFileNameWithoutExtension(file) + "-" + name + Path.GetExtension(file); @@ -68,8 +71,6 @@ image.Save(output); processor.OnProgress -= this.ProgressUpdate; } - - Trace.WriteLine($"{ name }: { watch.ElapsedMilliseconds}ms"); } } } @@ -86,8 +87,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); - string filename = Path.GetFileName(file); Image image = new Image(stream); @@ -96,8 +95,6 @@ image.Pad(image.Width + 50, image.Height + 50, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{watch.ElapsedMilliseconds}ms"); } } } @@ -115,7 +112,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); string filename = Path.GetFileNameWithoutExtension(file) + "-" + name + Path.GetExtension(file); Image image = new Image(stream); @@ -124,8 +120,6 @@ image.Resize(image.Width / 2, image.Height / 2, sampler, false, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{name}: {watch.ElapsedMilliseconds}ms"); } } } @@ -144,7 +138,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); string filename = Path.GetFileNameWithoutExtension(file) + "-" + name + Path.GetExtension(file); Image image = new Image(stream); @@ -153,8 +146,6 @@ image.Resize(image.Width / 3, 0, new TriangleResampler(), false, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{name}: {watch.ElapsedMilliseconds}ms"); } } } @@ -173,7 +164,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); string filename = Path.GetFileNameWithoutExtension(file) + "-" + name + Path.GetExtension(file); Image image = new Image(stream); @@ -182,8 +172,6 @@ image.Resize(0, image.Height / 3, new TriangleResampler(), false, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{name}: {watch.ElapsedMilliseconds}ms"); } } } @@ -200,7 +188,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); string filename = Path.GetFileName(file); Image image = new Image(stream); @@ -214,8 +201,6 @@ image.Resize(options, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{filename}: {watch.ElapsedMilliseconds}ms"); } } } @@ -232,7 +217,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); string filename = Path.GetFileName(file); Image image = new Image(stream); @@ -247,8 +231,6 @@ image.Resize(options, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{filename}: {watch.ElapsedMilliseconds}ms"); } } } @@ -265,7 +247,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); string filename = Path.GetFileName(file); Image image = new Image(stream); @@ -280,8 +261,6 @@ image.Resize(options, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{filename}: {watch.ElapsedMilliseconds}ms"); } } } @@ -298,7 +277,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); string filename = Path.GetFileName(file); Image image = new Image(stream); @@ -314,8 +292,6 @@ image.Resize(options, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{filename}: {watch.ElapsedMilliseconds}ms"); } } } @@ -332,7 +308,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); string filename = Path.GetFileName(file); Image image = new Image(stream); @@ -347,8 +322,6 @@ image.Resize(options, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{filename}: {watch.ElapsedMilliseconds}ms"); } } } @@ -365,7 +338,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); string filename = Path.GetFileName(file); Image image = new Image(stream); @@ -380,8 +352,6 @@ image.Resize(options, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{filename}: {watch.ElapsedMilliseconds}ms"); } } } @@ -398,7 +368,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); string filename = Path.GetFileName(file); Image image = new Image(stream); @@ -414,8 +383,6 @@ image.Resize(options, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{filename}: {watch.ElapsedMilliseconds}ms"); } } } @@ -433,7 +400,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); string filename = Path.GetFileNameWithoutExtension(file) + "-" + rotateType + flipType + Path.GetExtension(file); Image image = new Image(stream); @@ -442,8 +408,6 @@ image.RotateFlip(rotateType, flipType, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{rotateType + "-" + flipType}: {watch.ElapsedMilliseconds}ms"); } } } @@ -460,8 +424,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); - string filename = Path.GetFileName(file); Image image = new Image(stream); @@ -470,8 +432,6 @@ image.Rotate(63, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{watch.ElapsedMilliseconds}ms"); } } } @@ -489,8 +449,6 @@ { using (FileStream stream = File.OpenRead(file)) { - Stopwatch watch = Stopwatch.StartNew(); - string filename = Path.GetFileName(file); Image image = new Image(stream); @@ -499,8 +457,6 @@ image.Skew(20, 10, this.ProgressUpdate) .Save(output); } - - Trace.WriteLine($"{watch.ElapsedMilliseconds}ms"); } } } diff --git a/tests/ImageProcessorCore.Tests/project.json b/tests/ImageProcessorCore.Tests/project.json index 39d6d2654a..9a282c8fc5 100644 --- a/tests/ImageProcessorCore.Tests/project.json +++ b/tests/ImageProcessorCore.Tests/project.json @@ -14,16 +14,15 @@ }, "dependencies": { "ImageProcessorCore": "1.0.0-*", - "System.Diagnostics.TraceSource": "4.0.0-rc2-24027", - "xunit": "2.1.0", - "dotnet-test-xunit": "1.0.0-rc2-build10015" + "xunit": "2.2.0-*", + "dotnet-test-xunit": "2.2.0-*" }, "frameworks": { "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", - "version": "1.0.0-rc2-3002702" + "version": "1.0.0-*" } }, "imports": [