Ejemplo n.º 1
0
        public void TestListReverse()
        {
            var function = new ReverseFunction();
            var normal   = new List <int>(new[] { 1, 2, 3 });
            var reversed = new List <int>(new[] { 3, 2, 1 });

            Assert.That(function.Evaluate(normal), Is.EqualTo(reversed));
        }
Ejemplo n.º 2
0
        public void TestArrayReverse()
        {
            var function = new ReverseFunction();

            Assert.That(function.Evaluate(new[] { 1, 2, 3 }), Is.EqualTo(new[] { 3, 2, 1 }));
        }
Ejemplo n.º 3
0
        public void TestStringReverse()
        {
            var function = new ReverseFunction();

            Assert.That(function.Evaluate("abc"), Is.EqualTo("cba"));
        }
Ejemplo n.º 4
0
        public void TestNullReverse()
        {
            var function = new ReverseFunction();

            Assert.That(function.Evaluate(null), Is.EqualTo(null));
        }