示例#1
0
        public void IsPosValid_WithValidPos_ReturnTrue()
        {
            // arrange
            var layout     = new Layout(new[] { 3, 4 }, 0, new[] { 4, 1 });
            var fastAccess = new FastAccess(layout);

            // action
            var valid = fastAccess.IsPosValid(new[] { 1, 2 });

            // assert
            Assert.IsTrue(valid);
        }
示例#2
0
        public void IsPosValid_WithInvalidPosWrongLength_ReturnFalse()
        {
            // arrange
            var layout     = new Layout(new[] { 3, 4 }, 0, new[] { 4, 1 });
            var fastAccess = new FastAccess(layout);

            // action
            var valid = fastAccess.IsPosValid(new[] { 1 });

            // assert
            Assert.IsFalse(valid);
        }
示例#3
0
        public void IsPosValid_WithNegativeIndex_ReturnFalse()
        {
            // arrange
            var layout     = new Layout(new[] { 3, 4 }, 0, new[] { 4, 1 });
            var fastAccess = new FastAccess(layout);

            // action
            var valid = fastAccess.IsPosValid(new[] { -1, 2 });

            // assert
            Assert.IsFalse(valid);
        }