Better communication
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using FluentAssertions;
|
||||
using Gameboard.ShogiUI.Sockets.Models;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace Gameboard.ShogiUI.Sockets.UnitTests.Models
|
||||
{
|
||||
[TestClass]
|
||||
public class CoordsModelShould
|
||||
{
|
||||
[TestMethod]
|
||||
public void ConvertToNotation()
|
||||
{
|
||||
var letters = "ABCDEFGHI";
|
||||
|
||||
for (var x = 0; x < 8; x++) // file
|
||||
{
|
||||
for (var y = 0; y < 8; y++) // rank
|
||||
{
|
||||
var move = new Coords(x, y);
|
||||
var actual = move.ToBoardNotation();
|
||||
var expected = $"{letters[x]}{y + 1}";
|
||||
actual.Should().Be(expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user