public void TrackingCharDifferentCaseCaseSensitiveNotBreaksTest()
        {
            var supressor = new AdjacentDuplicatesSuppressor(1, 1, "ac", false);

            var actual = supressor.BreaksRestrictions("abBc");

            Assert.False(actual);
        }
        public void DuplicatesCaseInsensitiveTest()
        {
            var supressor = new AdjacentDuplicatesSuppressor();

            var actual = supressor.BreaksRestrictions("abbc");

            Assert.True(actual);
        }
        public void TrackingCharDifferentCaseCaseInsensitiveTest()
        {
            var supressor = new AdjacentDuplicatesSuppressor(1, 1, "bC");

            var actual = supressor.BreaksRestrictions("aabBc");

            Assert.True(actual);
        }
        public void MaxLengthDifferentCaseCaseInsensitiveNotBreaksTest()
        {
            var supressor = new AdjacentDuplicatesSuppressor(1, 2);

            var actual = supressor.BreaksRestrictions("abBc");

            Assert.False(actual);
        }
        public void DifferentCaseCaseSensitiveTest()
        {
            var supressor = new AdjacentDuplicatesSuppressor(1, 1, null, false);

            var actual = supressor.BreaksRestrictions("abBc");

            Assert.False(actual);
        }
        public void NoDuplicatesTest()
        {
            var supressor = new AdjacentDuplicatesSuppressor();

            var actual = supressor.BreaksRestrictions("abc");

            Assert.False(actual);
        }
Ejemplo n.º 7
0
        public void FixedLengthNoDuplicatesTest()
        {
            var supressor = new AdjacentDuplicatesSuppressor();
            var generator = new ArbitraryVariationGenerator("01", 2, 2,
                                                            CharCase.AsDefined, new List <ISuppressor> {
                supressor
            });

            var actual   = generator.GetVariationsString();
            var expected = new StringBuilder();

            expected.AppendLine("10");
            expected.AppendLine("01");

            Assert.Equal(expected.ToString(), actual);
            Assert.Equal <ulong>(2, generator.VariationNumber);
            Assert.Equal <ulong>(4, generator.LoopNumber);
            Assert.Equal <ulong>(4, generator.LoopCount);
        }