Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }