예제 #1
0
 public void IsEmptyTest_null()
 {
     SolidColorBrush background = new SolidColorBrush(Color.FromRgb(255, 255, 255));     //Background is irrelevant
     Tile target = new Tile(background);
     target.Piece = null;                // There is now no piece present on the tile
     bool expected = true;              // "True" is therefore expected
     bool actual;
     actual = target.IsEmpty();
     Assert.AreEqual(expected, actual);
 }
예제 #2
0
 public void IsEmptyTest_notNull()
 {
     SolidColorBrush background = new SolidColorBrush(Color.FromRgb(255, 255, 255));   //Background is irrelevant
     Tile target = new Tile(background);
     target.Piece = PieceBuilder.MakeBishop(new Point(0, 0), Side.Light);              // There is now a piece present on the tile
     bool expected = false;                                                            // "False" is therefore expected
     bool actual;
     actual = target.IsEmpty();
     Assert.AreEqual(expected, actual);
 }