コード例 #1
0
        public void CheckIfOutOfMatrixNullTest()
        {
            int   matrixSize = 4;
            Point point      = null;

            OutOfMatrixChecker.CheckIfOutOfMatrix(point, matrixSize);
        }
コード例 #2
0
        public void CheckIfOutOfMatrixInvalidSizeTest()
        {
            int   matrixSize = 0;
            Point point      = new Point(2, 3);

            OutOfMatrixChecker.CheckIfOutOfMatrix(point, matrixSize);
        }
コード例 #3
0
        public void CheckIfOutOfMatrixFalseTest()
        {
            int   matrixSize = 4;
            Point point      = new Point(2, 3);

            Assert.IsFalse(OutOfMatrixChecker.CheckIfOutOfMatrix(point, matrixSize));
        }
コード例 #4
0
        public void CheckIfOutOfMatrixTrueTest()
        {
            int   matrixSize = 4;
            Point point      = new Point(2, 4);

            Assert.IsTrue(OutOfMatrixChecker.CheckIfOutOfMatrix(point, matrixSize));
        }
コード例 #5
0
 public void OutOfMatrixCheckerShouldRetrunFalseOnPointInsideMatrix()
 {
     this.point        = new Point(3, 0);
     this.matrixLength = 4;
     Assert.AreEqual(false, OutOfMatrixChecker.CheckIfOutOfMatrix(point, matrixLength));
 }
コード例 #6
0
 public void OutOfMatrixCheckerShouldRetrunTrueOnPointOutsideMatrix()
 {
     this.point        = new Point(4, 0);
     this.matrixLength = 4;
     Assert.AreEqual(true, OutOfMatrixChecker.CheckIfOutOfMatrix(point, matrixLength));
 }
コード例 #7
0
 public void OutOfMatrixCheckerShouldThrowExceptionOnNullPointPassed()
 {
     this.point        = null;
     this.matrixLength = 16;
     OutOfMatrixChecker.CheckIfOutOfMatrix(point, matrixLength);
 }
コード例 #8
0
 public void OutOfMatrixCheckerShouldThrowExceptionOnZeroMatrixLengthPassed()
 {
     this.point        = new Point(0, 0);
     this.matrixLength = 0;
     OutOfMatrixChecker.CheckIfOutOfMatrix(point, matrixLength);
 }