コード例 #1
0
        public void TestIfCellWhiteColorIsCorrectlySetDisplayed()
        {
            BlownCell blownCell = new BlownCell();

            blownCell.X        = 2;
            blownCell.Y        = 3;
            blownCell.Color    = Color.White;
            blownCell.CellView = CellView.Bomb1;

            string cellToString = blownCell.ToString();


            Assert.AreEqual(cellToString, " 1 ", string.Format("!{0}!", cellToString));
        }
コード例 #2
0
        public void CellsTestIfBlowCellIsCloned()
        {
            BlownCell blownCell = new BlownCell();

            blownCell.X        = 2;
            blownCell.Y        = 3;
            blownCell.Color    = Color.White;
            blownCell.CellView = CellView.Bomb1;

            ICell clonedBlownCell = blownCell.Clone();

            Assert.AreEqual(blownCell.X, clonedBlownCell.X, "X coordinate has not cloned.");
            Assert.AreEqual(blownCell.Y, clonedBlownCell.Y, "Y coordinate has not cloned.");
            Assert.AreEqual(blownCell.Color, clonedBlownCell.Color, "Cell Color has not cloned.");
            Assert.AreEqual(blownCell.CellView, clonedBlownCell.CellView, "CellView Color has not cloned.");
        }
コード例 #3
0
        public void CellsTestIfBlownCellYIsPositive()
        {
            var cellBlown = new BlownCell();

            cellBlown.Y = -1;
        }
コード例 #4
0
        public void CellsTestIfBlownCellXIsPositive()
        {
            var blownCell = new BlownCell();

            blownCell.X = -1;
        }