示例#1
0
        public void TestFindFirstRngPositionFailure()
        {
            MockRngHelper rng = GetHelper();

            Assert.IsFalse(rng.FindFirstRngPosition(10));
            Assert.IsFalse(rng.FindFirstRngPosition(85));
            Assert.IsFalse(rng.FindFirstRngPosition(98));
            Assert.IsFalse(rng.FindFirstRngPosition(500));
        }
示例#2
0
        public void TestReinitialize()
        {
            MockRngHelper rng = GetHelper();

            Assert.IsTrue(rng.FindFirstRngPosition(92));
            Assert.IsTrue(rng.FindNextRngPosition(95));
            rng.Reinitialize();
            Assert.IsFalse(rng.FindNextRngPosition(88));
        }
示例#3
0
        public void TestFindNextRngPositionFirstPosition_Basic()
        {
            MockRngHelper rng = GetHelper();

            Assert.IsTrue(rng.FindFirstRngPosition(91));
            Assert.IsTrue(rng.FindNextRngPosition(88));
            Assert.IsTrue(rng.FindNextRngPosition(92));
            Assert.IsTrue(rng.FindNextRngPosition(94));
            Assert.IsTrue(rng.FindNextRngPosition(94));
            Assert.IsTrue(rng.FindNextRngPosition(94));
            Assert.IsTrue(rng.FindNextRngPosition(95));
        }
示例#4
0
        public void TestFindFirstRngPositionSuccessful()
        {
            MockRngHelper rng = GetHelper();

            Assert.IsTrue(rng.FindFirstRngPosition(86));
            Assert.IsTrue(rng.FindFirstRngPosition(88));
            Assert.IsTrue(rng.FindFirstRngPosition(90));
            Assert.IsTrue(rng.FindFirstRngPosition(92));
            Assert.IsTrue(rng.FindFirstRngPosition(95));
            Assert.IsTrue(rng.FindFirstRngPosition(97));
        }
示例#5
0
        public void TestFindNextRngPositionFirstPosition()
        {
            MockRngHelper rng = GetHelper();

            Assert.IsTrue(rng.FindFirstRngPosition(92));
            Assert.IsTrue(rng.FindNextRngPosition(95));
            Assert.IsTrue(rng.FindNextRngPosition(88));
            Assert.IsTrue(rng.FindNextRngPosition(89));
            Assert.IsTrue(rng.FindNextRngPosition(95));
            Assert.IsTrue(rng.FindNextRngPosition(93));
            Assert.IsTrue(rng.FindNextRngPosition(94));
            Assert.IsTrue(rng.FindNextRngPosition(96));
            Assert.IsTrue(rng.FindNextRngPosition(92));
            Assert.IsTrue(rng.FindNextRngPosition(97));
            Assert.IsTrue(rng.FindNextRngPosition(88));
            Assert.IsFalse(rng.FindNextRngPosition(94));
        }
示例#6
0
        public void TestFindNextRngPositionWithMultipleGroupMembers()
        {
            MockRngHelper rng = GetHelper(TestUtils.GetComplexCharacterGroup());

            Assert.IsTrue(rng.FindFirstRngPosition(94));
            Assert.IsTrue(rng.FindNextRngPosition(142));
            Assert.IsTrue(rng.FindNextRngPosition(215));
            Assert.IsTrue(rng.FindNextRngPosition(91));
            Assert.IsTrue(rng.FindNextRngPosition(139));
            Assert.IsTrue(rng.FindNextRngPosition(203));
            Assert.IsTrue(rng.FindNextRngPosition(94));
            Assert.IsTrue(rng.FindNextRngPosition(140));
            Assert.IsTrue(rng.FindNextRngPosition(219));
            Assert.IsTrue(rng.FindNextRngPosition(88));
            Assert.IsTrue(rng.FindNextRngPosition(141));
            Assert.IsFalse(rng.FindNextRngPosition(90));
            Assert.IsFalse(rng.FindNextRngPosition(205));
        }
示例#7
0
        public void TestFindNextRngPositionFirstPositionCanContinueAfterFailing()
        {
            MockRngHelper rng = GetHelper();

            Assert.IsTrue(rng.FindFirstRngPosition(92));
            Assert.IsTrue(rng.FindNextRngPosition(95));
            Assert.IsTrue(rng.FindNextRngPosition(88));
            Assert.IsTrue(rng.FindNextRngPosition(89));
            Assert.IsTrue(rng.FindNextRngPosition(95));
            Assert.IsFalse(rng.FindNextRngPosition(100));
            Assert.IsTrue(rng.FindNextRngPosition(93));
            Assert.IsTrue(rng.FindNextRngPosition(94));
            Assert.IsTrue(rng.FindNextRngPosition(96));
            Assert.IsFalse(rng.FindNextRngPosition(85));
            Assert.IsTrue(rng.FindNextRngPosition(92));
            Assert.IsTrue(rng.FindNextRngPosition(97));
            Assert.IsTrue(rng.FindNextRngPosition(88));
            Assert.IsFalse(rng.FindNextRngPosition(94));
            Assert.IsTrue(rng.FindNextRngPosition(97));
        }