|
|
|
@ -6,7 +6,7 @@ public class CellTest
|
|
|
|
|
[Fact]
|
|
|
|
|
public void CellConstructor_SetsCorrectValues()
|
|
|
|
|
{
|
|
|
|
|
var cell = new Cell(1, 2, true);
|
|
|
|
|
Cell cell = new Cell(1, 2, true);
|
|
|
|
|
|
|
|
|
|
Assert.Equal(1, cell.X);
|
|
|
|
|
Assert.Equal(2, cell.Y);
|
|
|
|
@ -16,7 +16,7 @@ public class CellTest
|
|
|
|
|
[Fact]
|
|
|
|
|
public void CellConstructor_SetsDefaultValues()
|
|
|
|
|
{
|
|
|
|
|
var cell = new Cell(1, 2);
|
|
|
|
|
Cell cell = new Cell(1, 2);
|
|
|
|
|
|
|
|
|
|
Assert.Equal(1, cell.X);
|
|
|
|
|
Assert.Equal(2, cell.Y);
|
|
|
|
@ -26,7 +26,7 @@ public class CellTest
|
|
|
|
|
[Fact]
|
|
|
|
|
public void ValueSetter_ThrowsException_WhenValueIsNegative()
|
|
|
|
|
{
|
|
|
|
|
var cell = new Cell(1, 2);
|
|
|
|
|
Cell cell = new Cell(1, 2);
|
|
|
|
|
|
|
|
|
|
Assert.Throws<Exception>(() => cell.Value = -1);
|
|
|
|
|
}
|
|
|
|
@ -34,7 +34,7 @@ public class CellTest
|
|
|
|
|
[Fact]
|
|
|
|
|
public void ValueSetter_SetsValue_WhenValueIsPositive()
|
|
|
|
|
{
|
|
|
|
|
var cell = new Cell(1, 2);
|
|
|
|
|
Cell cell = new Cell(1, 2);
|
|
|
|
|
|
|
|
|
|
cell.Value = 5;
|
|
|
|
|
|
|
|
|
@ -44,7 +44,7 @@ public class CellTest
|
|
|
|
|
[Fact]
|
|
|
|
|
public void ValueSetter_SetsValue_WhenValueIsNull()
|
|
|
|
|
{
|
|
|
|
|
var cell = new Cell(1, 2);
|
|
|
|
|
Cell cell = new Cell(1, 2);
|
|
|
|
|
Assert.Null(cell.Value);
|
|
|
|
|
}
|
|
|
|
|
}
|