예제 #1
0
        public void CellConstructorMustConstructInstanceWithProperPropertyValues()
        {
            Cell cell = new Cell();

            Assert.AreEqual(false, cell.IsBomb, "IsBomb initial value must be false;");
            Assert.AreEqual(false, cell.IsOpen, "IsOpen initial value must be false;");
        }
예제 #2
0
        public void CellPropertyNumberOfMinesGetterAndSetterWorksProper(int number)
        {
            Cell cell = new Cell();

            cell.NumberOfMines = number;

            Assert.AreEqual(number, cell.NumberOfMines, "Expected and actual value of NumberOfMines property are not equal");
        }
예제 #3
0
        public void CellPropertyIsBombGetterAndSetterWorksProper()
        {
            Cell cell = new Cell();

            bool expectedIsBomb = true;
            cell.IsBomb = expectedIsBomb;

            Assert.AreEqual(expectedIsBomb, cell.IsBomb, "Expected and actual value of IsBomb property are not equal");
        }
예제 #4
0
        public void CellPropertyIsOpenGetterAndSetterWorksProper()
        {
            Cell cell = new Cell();

            bool expectedIsOpen = true;
            cell.IsOpen = expectedIsOpen;

            bool actualIsOpen = cell.IsOpen;

            Assert.AreEqual(expectedIsOpen, actualIsOpen, "Expected and actual value of IsOpen property are not equal");
        }