using FluentAssertions; using Gameboard.ShogiUI.BoardState; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Gameboard.ShogiUI.UnitTests.BoardState { [TestClass] public class BoardVectorShould { [TestMethod] public void BeEqualWhenPropertiesAreEqual() { var a = new BoardVector(3, 2); var b = new BoardVector(3, 2); a.Should().Be(b); a.GetHashCode().Should().Be(b.GetHashCode()); (a == b).Should().BeTrue(); // Properties should not be transitively equal. b = new BoardVector(2, 3); a.Should().NotBe(b); a.GetHashCode().Should().NotBe(b.GetHashCode()); (a == b).Should().BeFalse(); } } }