📷 A modern, cross-platform, 2D Graphics library for .NET
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.
 
 

52 lines
1.4 KiB

// <copyright file="ExifValueTests.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 System.Linq;
using ImageSharp.PixelFormats;
using Xunit;
public class ExifValueTests
{
private static ExifValue GetExifValue()
{
ExifProfile profile;
using (Image<Rgba32> image = TestFile.Create(TestImages.Jpeg.Baseline.Floorplan).CreateImage())
{
profile = image.MetaData.ExifProfile;
}
Assert.NotNull(profile);
return profile.Values.First();
}
[Fact]
public void IEquatable()
{
ExifValue first = GetExifValue();
ExifValue second = GetExifValue();
Assert.True(first == second);
Assert.True(first.Equals(second));
Assert.True(first.Equals((object)second));
}
[Fact]
public void Properties()
{
ExifValue value = GetExifValue();
Assert.Equal(ExifDataType.Ascii, value.DataType);
Assert.Equal(ExifTag.GPSDOP, value.Tag);
Assert.False(value.IsArray);
Assert.Equal("Windows Photo Editor 10.0.10011.16384", value.ToString());
Assert.Equal("Windows Photo Editor 10.0.10011.16384", value.Value);
}
}
}