📷 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.
 
 

55 lines
1.6 KiB

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="PointTests.cs" company="James Jackson-South">
// Copyright © James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
// <summary>
// Tests the <see cref="Point" /> struct.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace ImageProcessorCore.Tests
{
using Xunit;
/// <summary>
/// Tests the <see cref="Point"/> struct.
/// </summary>
public class PointTests
{
/// <summary>
/// Tests the equality operators for equality.
/// </summary>
[Fact]
public void AreEqual()
{
Point first = new Point(100, 100);
Point second = new Point(100, 100);
Assert.Equal(first, second);
}
/// <summary>
/// Tests the equality operators for inequality.
/// </summary>
[Fact]
public void AreNotEqual()
{
Point first = new Point(0, 100);
Point second = new Point(100, 100);
Assert.NotEqual(first, second);
}
/// <summary>
/// Tests whether the point constructor correctly assign properties.
/// </summary>
[Fact]
public void ConstructorAssignsProperties()
{
Point first = new Point(4, 5);
Assert.Equal(4, first.X);
Assert.Equal(5, first.Y);
}
}
}