|
|
|
@ -4,18 +4,21 @@ namespace TestBase;
|
|
|
|
|
public class TestCell
|
|
|
|
|
{
|
|
|
|
|
[Theory]
|
|
|
|
|
[InlineData(true, 10, 20, 10, 20)]
|
|
|
|
|
[InlineData(false, -10, 20, -10, 20)]
|
|
|
|
|
|
|
|
|
|
public void Test_CellConstructor(bool isValid, int expectedX, int expectedY, int x, int y)
|
|
|
|
|
[InlineData(true, 10, 20)]
|
|
|
|
|
[InlineData(false, -10, -10)]
|
|
|
|
|
[InlineData(false, 10, -10)]
|
|
|
|
|
[InlineData(false, -10, 10)]
|
|
|
|
|
|
|
|
|
|
public void Test_CellConstructor(bool isValid, int x, int y)
|
|
|
|
|
{
|
|
|
|
|
if (!isValid)
|
|
|
|
|
{
|
|
|
|
|
Assert.Throws<ArgumentException>(() => new Cell(x, y));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Cell c = new Cell(x, y);
|
|
|
|
|
Assert.Equal(expectedX, x);
|
|
|
|
|
Assert.Equal(expectedY, y);
|
|
|
|
|
Assert.Equal(x, c.GetX);
|
|
|
|
|
Assert.Equal(y, c.GetY);
|
|
|
|
|
}
|
|
|
|
|
}
|