Browse Source

Renamed test classes.

af/merge-core
Dirk Lemstra 9 years ago
committed by Dirk Lemstra
parent
commit
1b4b8043bc
  1. 4
      tests/ImageSharp.Tests/Formats/Bmp/BmpEncoderTests.cs
  2. 4
      tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs
  3. 4
      tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs
  4. 44
      tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderCoreTests.cs
  5. 32
      tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs
  6. 4
      tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs
  7. 6
      tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs

4
tests/ImageSharp.Tests/Formats/Bmp/BitmapTests.cs → tests/ImageSharp.Tests/Formats/Bmp/BmpEncoderTests.cs

@ -1,4 +1,4 @@
// <copyright file="BitmapTests.cs" company="James Jackson-South">
// <copyright file="BmpEncoderTests.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
@ -9,7 +9,7 @@ namespace ImageSharp.Tests
{
using Xunit;
public class BitmapTests : FileTestBase
public class BmpEncoderTests : FileTestBase
{
public static readonly TheoryData<BmpBitsPerPixel> BitsPerPixel
= new TheoryData<BmpBitsPerPixel>

4
tests/ImageSharp.Tests/Formats/Gif/GifDecoderCoreTests.cs → tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs

@ -1,4 +1,4 @@
// <copyright file="GifDecoderCoreTests.cs" company="James Jackson-South">
// <copyright file="GifDecoderTests.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
@ -10,7 +10,7 @@ namespace ImageSharp.Tests
using ImageSharp.Formats;
public class GifDecoderCoreTests
public class GifDecoderTests
{
[Fact]
public void Decode_IgnoreMetadataIsFalse_CommentsAreRead()

4
tests/ImageSharp.Tests/Formats/Gif/GifEncoderCoreTests.cs → tests/ImageSharp.Tests/Formats/Gif/GifEncoderTests.cs

@ -1,4 +1,4 @@
// <copyright file="GifEncoderCoreTests.cs" company="James Jackson-South">
// <copyright file="GifEncoderTests.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
@ -10,7 +10,7 @@ namespace ImageSharp.Tests
using ImageSharp.Formats;
public class GifEncoderCoreTests
public class GifEncoderTests
{
[Fact]
public void Encode_IgnoreMetadataIsFalse_CommentsAreWritten()

44
tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderCoreTests.cs

@ -1,44 +0,0 @@
// <copyright file="JpegDecoderCoreTests.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageSharp.Tests
{
using Xunit;
public class JpegDecoderCoreTests
{
[Fact]
public void Decode_IgnoreMetadataIsFalse_ExifProfileIsRead()
{
var options = new DecoderOptions()
{
IgnoreMetadata = false
};
TestFile testFile = TestFile.Create(TestImages.Jpeg.Baseline.Floorplan);
using (Image image = testFile.CreateImage(options))
{
Assert.NotNull(image.MetaData.ExifProfile);
}
}
[Fact]
public void Decode_IgnoreMetadataIsTrue_ExifProfileIgnored()
{
var options = new DecoderOptions()
{
IgnoreMetadata = true
};
TestFile testFile = TestFile.Create(TestImages.Jpeg.Baseline.Floorplan);
using (Image image = testFile.CreateImage(options))
{
Assert.Null(image.MetaData.ExifProfile);
}
}
}
}

32
tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs

@ -121,5 +121,37 @@ namespace ImageSharp.Tests
Assert.Equal(72, image.MetaData.VerticalResolution);
}
}
[Fact]
public void Decode_IgnoreMetadataIsFalse_ExifProfileIsRead()
{
var options = new DecoderOptions()
{
IgnoreMetadata = false
};
TestFile testFile = TestFile.Create(TestImages.Jpeg.Baseline.Floorplan);
using (Image image = testFile.CreateImage(options))
{
Assert.NotNull(image.MetaData.ExifProfile);
}
}
[Fact]
public void Decode_IgnoreMetadataIsTrue_ExifProfileIgnored()
{
var options = new DecoderOptions()
{
IgnoreMetadata = true
};
TestFile testFile = TestFile.Create(TestImages.Jpeg.Baseline.Floorplan);
using (Image image = testFile.CreateImage(options))
{
Assert.Null(image.MetaData.ExifProfile);
}
}
}
}

4
tests/ImageSharp.Tests/Formats/Png/PngDecoderCoreTests.cs → tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs

@ -1,4 +1,4 @@
// <copyright file="JpegDecoderCoreTests.cs" company="James Jackson-South">
// <copyright file="PngDecoderTests.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
@ -10,7 +10,7 @@ namespace ImageSharp.Tests
using ImageSharp.Formats;
public class PngDecoderCoreTests
public class PngDecoderTests
{
[Fact]
public void Decode_IgnoreMetadataIsFalse_TextChunckIsRead()

6
tests/ImageSharp.Tests/Formats/Png/PngTests.cs → tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs

@ -1,4 +1,4 @@
// <copyright file="PngTests.cs" company="James Jackson-South">
// <copyright file="PngEncoderTests.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
@ -10,11 +10,9 @@ namespace ImageSharp.Tests
using System.IO;
using System.Threading.Tasks;
using Formats;
using Xunit;
public class PngTests : FileTestBase
public class PngEncoderTests : FileTestBase
{
[Fact]
public void ImageCanSaveIndexedPng()
Loading…
Cancel
Save