mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.0 KiB
41 lines
1.0 KiB
// Copyright (c) Six Labors.
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
using SixLabors.ImageSharp.Metadata.Profiles.Icc;
|
|
using Xunit;
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Metadata.Profiles.Icc
|
|
{
|
|
[Trait("Profile", "Icc")]
|
|
public class IccWriterTests
|
|
{
|
|
[Fact]
|
|
public void WriteProfile_NoEntries()
|
|
{
|
|
IccWriter writer = this.CreateWriter();
|
|
|
|
var profile = new IccProfile
|
|
{
|
|
Header = IccTestDataProfiles.Header_Random_Write
|
|
};
|
|
byte[] output = writer.Write(profile);
|
|
|
|
Assert.Equal(IccTestDataProfiles.Header_Random_Array, output);
|
|
}
|
|
|
|
[Fact]
|
|
public void WriteProfile_DuplicateEntry()
|
|
{
|
|
IccWriter writer = this.CreateWriter();
|
|
|
|
byte[] output = writer.Write(IccTestDataProfiles.Profile_Random_Val);
|
|
|
|
Assert.Equal(IccTestDataProfiles.Profile_Random_Array, output);
|
|
}
|
|
|
|
private IccWriter CreateWriter()
|
|
{
|
|
return new IccWriter();
|
|
}
|
|
}
|
|
}
|
|
|