Browse Source

Point tests

Former-commit-id: 925454bb65a6cf78842aa7dd2b34fb6207a5175f
Former-commit-id: f79b8487d8f247d7b84ec41fd702cafacb7bba85
Former-commit-id: 4a53a2ab32bb8d7e73ce3ecdf43de0de8c48cc54
pull/1/head
James Jackson-South 10 years ago
parent
commit
b9442f1ed7
  1. 53
      tests/ImageProcessorCore.Tests/Numerics/PointTests.cs

53
tests/ImageProcessorCore.Tests/Numerics/PointTests.cs

@ -1,11 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
// <copyright file="PointTests.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
namespace ImageProcessor.Tests.Numerics
namespace ImageProcessorCore.Tests
{
public class Class
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);
}
}
}
}
Loading…
Cancel
Save