mirror of https://github.com/SixLabors/ImageSharp
Browse Source
Former-commit-id: e140d562a45ef0dc7fa3e1e5dfc3ec330040b696 Former-commit-id: 9256abfb4eca778a2051d32edc198979bd359de2 Former-commit-id: 0076f821040d894bb10e923c4a5a370932eae48baf/merge-core
2 changed files with 68 additions and 6 deletions
@ -0,0 +1,52 @@ |
|||||
|
// <copyright file="ColorConversionTests.cs" company="James Jackson-South">
|
||||
|
// Copyright (c) James Jackson-South and contributors.
|
||||
|
// Licensed under the Apache License, Version 2.0.
|
||||
|
// </copyright>
|
||||
|
|
||||
|
namespace ImageProcessorCore.Tests |
||||
|
{ |
||||
|
using Xunit; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Tests the <see cref="ImageProperty"/> class.
|
||||
|
/// </summary>
|
||||
|
public class ImagePropertyTests |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Tests the equality operators for inequality.
|
||||
|
/// </summary>
|
||||
|
[Fact] |
||||
|
public void AreEqual() |
||||
|
{ |
||||
|
ImageProperty property1 = new ImageProperty("Foo", "Bar"); |
||||
|
ImageProperty property2 = new ImageProperty("Foo", "Bar"); |
||||
|
ImageProperty property3 = null; |
||||
|
|
||||
|
Assert.Equal(property1, property2); |
||||
|
Assert.True(property1 == property2); |
||||
|
Assert.Equal(property3, null); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Tests the equality operators for equality.
|
||||
|
/// </summary>
|
||||
|
[Fact] |
||||
|
public void AreNotEqual() |
||||
|
{ |
||||
|
ImageProperty property1 = new ImageProperty("Foo", "Bar"); |
||||
|
ImageProperty property2 = new ImageProperty("Foo", "Foo"); |
||||
|
ImageProperty property3 = new ImageProperty("Bar", "Bar"); |
||||
|
|
||||
|
Assert.False(property1.Equals("Foo")); |
||||
|
|
||||
|
Assert.NotEqual(property1, null); |
||||
|
|
||||
|
Assert.NotEqual(property1, property2); |
||||
|
Assert.True(property1 != property2); |
||||
|
|
||||
|
Assert.NotEqual(property1, property3); |
||||
|
Assert.True(property1 != property3); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue