mirror of
https://github.com/MUnique/OpenMU
synced 2026-08-15 14:32:19 -04:00
The most changes are obviously by usage of the global using and file namespace features. Additionally, because I was in a flow, I changed all private field names to start with an underscore.
27 lines
No EOL
850 B
C#
27 lines
No EOL
850 B
C#
// <copyright file="NodeComparerTest.cs" company="MUnique">
|
|
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
|
|
// </copyright>
|
|
|
|
namespace MUnique.OpenMU.Pathfinding.Tests;
|
|
|
|
using MUnique.OpenMU.Pathfinding;
|
|
|
|
/// <summary>
|
|
/// Tests the <see cref="NodeComparer"/>.
|
|
/// </summary>
|
|
[TestFixture]
|
|
internal class NodeComparerTest
|
|
{
|
|
/// <summary>
|
|
/// Tests if <see cref="NodeComparer.Compare(Node, Node)"/> does return the
|
|
/// correct value when comparing two different nodes with different costs.
|
|
/// </summary>
|
|
[Test]
|
|
public void Compare()
|
|
{
|
|
var node1 = new Node { PredictedTotalCost = 1 };
|
|
var node2 = new Node { PredictedTotalCost = 2 };
|
|
var comparer = new NodeComparer();
|
|
Assert.That(comparer.Compare(node1, node2), Is.Negative);
|
|
}
|
|
} |