Exemplo n.º 1
0
        public void IsBetween_Invoke_TrueIsReturned_DateTime()
        {
            //init
            var isBetween = new IsBetween();
            //exe
            var result = isBetween.Invoke(new[] { "2016/10/14", "2016/10/13", "2016/10/16" });

            //assert
            Assert.IsTrue(result, "IsBetween returned the wrong result when comparing integers");
        }
Exemplo n.º 2
0
        public void IsBetween_Invoke_IsToValue_FalseIsReturned()
        {
            //init
            var isBetween = new IsBetween();
            //exe
            var result = isBetween.Invoke(new[] { "50", "2", "50" });

            //assert
            Assert.IsTrue(result, "IsBetween returned the wrong result when comparing integers");
        }
Exemplo n.º 3
0
        public void IsBetween_IsBetweenUnitTest_Invoke_IsFromValue_FalseIsReturned()
        {
            //init
            var comparer = new IsBetween();

            //exe
            var actual = comparer.Invoke(new[] { "2", "2", "50" });

            //assert
            Assert.IsTrue(actual, "IsBetween returned the wrong result when comparing integers");
        }
Exemplo n.º 4
0
        public void IsBetween_IsBetweenUnitTest_Invoke_FalseIsReturned_DateTime()
        {
            //init
            var comparer = new IsBetween();

            //exe
            var actual = comparer.Invoke(new[] { "2016/10/17", "2016/10/13", "2016/10/16" });

            //assert
            Assert.IsFalse(actual, "IsBetween returned the wrong result when comparing integers");
        }
        // ReSharper disable InconsistentNaming
        public void IsBetween_IsBetweenUnitTest_Invoke_FalseIsReturned()
        // ReSharper restore InconsistentNaming
        {
            //init
            var comparer = new IsBetween();

            //exe
            var actual = comparer.Invoke(new[] { "100", "2", "50" });

            //assert
            Assert.IsFalse(actual, "IsBetween returned the wrong result when comparing integers");
        }
Exemplo n.º 6
0
        public void IsBetween_Invoke_Type_Null_DateTime_ReturnsTrue()
        {
            //------------Setup for test--------------------------
            var isBetween = new IsBetween();
            var cols      = new string[3];

            cols[0] = null;
            cols[1] = null;
            cols[2] = null;

            //------------Execute Test---------------------------
            var result = isBetween.Invoke(cols);

            //------------Assert Results-------------------------
            Assert.IsTrue(result);
        }