Ejemplo n.º 1
0
        public void Index_ArrayAndHugeInt()
        {
            var output = RockFilters.Index(new string[] { "value1", "value2", "value3" }, int.MaxValue);

            Assert.Equal(null, output);
        }
Ejemplo n.º 2
0
        public void Index_ArrayAndNegativeInt()
        {
            var output = RockFilters.Index(new string[] { "value1", "value2", "value3" }, -1);

            Assert.Equal(null, output);
        }
Ejemplo n.º 3
0
        public void Index_ArrayAndInt()
        {
            var output = RockFilters.Index(new string[] { "value1", "value2", "value3" }, 1);

            Assert.Equal("value2", output);
        }
Ejemplo n.º 4
0
        public void Index_ArrayAndInvalidString()
        {
            var output = RockFilters.Index(new string[] { "value1", "value2", "value3" }, "a");

            Assert.Equal(null, output);
        }
Ejemplo n.º 5
0
        public void Index_ArrayAndString()
        {
            var output = RockFilters.Index(new string[] { "value1", "value2", "value3" }, "1");

            Assert.That.AreEqual("value2", output);
        }