Пример #1
0
        public void ContainsRangeMixed()
        {
            KataRange innerRange  = new KataRange("[2,10]");
            KataRange outterRange = new KataRange("[2,9)");

            Assert.False(outterRange.Contains(innerRange));
        }
Пример #2
0
        public void ContainsRangeLimits()
        {
            KataRange innerRange  = new KataRange("[2,4]");
            KataRange outterRange = new KataRange("(2,9)");

            Assert.False(outterRange.Contains(innerRange));
        }
Пример #3
0
        public void ContainsRangeNormal()
        {
            KataRange innerRange  = new KataRange("[3,4]");
            KataRange outterRange = new KataRange("[2,9]");

            Assert.True(outterRange.Contains(innerRange));
        }
Пример #4
0
        public void InvalidContainsOutside()
        {
            int[]     integers = new int[] { 1, 3, 8 };
            string    rangeStr = "(2, 9)";
            KataRange range    = new KataRange(rangeStr);

            Assert.False(range.Contains(integers));
        }
Пример #5
0
        public void InvalidContainsLimit()
        {
            int[]     integers = new int[] { 2, 3, 9 };
            string    rangeStr = "(2, 9)";
            KataRange range    = new KataRange(rangeStr);

            Assert.False(range.Contains(integers));
        }
Пример #6
0
        public void ValidContains()
        {
            int[]     integers = new int[] { 2, 4, 5, 6 };
            string    rangeStr = "[2, 9]";
            KataRange range    = new KataRange(rangeStr);

            Assert.True(range.Contains(integers));
        }