コード例 #1
0
        public void IsGreaterThanOrEqual_IsGreaterThanOrEqualUnitTest_Invoke_TrueIsReturned()

        {
            //init
            var comparer = new IsGreaterThanOrEqual();

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

            //assert
            Assert.IsTrue(actual, "IsGreaterThanOrEqual returned the wrong result when comparing integers");
            //exe
            actual = comparer.Invoke(new[] { "Vals", "Val2" });
            //assert
            Assert.IsTrue(actual, "IsGreaterThanOrEqual returned the wrong result when comparing strings");

            //exe
            actual = comparer.Invoke(new[] { string.Empty });
            //assert
            Assert.IsFalse(actual, "IsGreaterThanOrEqual returned the wrong result when comparing empty string");
        }
コード例 #2
0
        public void IsGreaterThanOrEqual_IsGreaterThanOrEqualUnitTest_Invoke_FalseIsReturned()

        {
            //init
            var comparer = new IsGreaterThanOrEqual();

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

            //assert
            Assert.IsFalse(actual, "IsGreaterThanOrEqual returned the wrong result when comparing integers");
        }
コード例 #3
0
        // ReSharper disable InconsistentNaming
        public void IsGreaterThanOrEqual_IsGreaterThanOrEqualUnitTest_InvokeWithEqualStrings_TrueIsReturned()
        // ReSharper restore InconsistentNaming
        {
            //init
            var comparer = new IsGreaterThanOrEqual();

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

            //assert
            Assert.IsTrue(actual, "IsGreaterThanOrEqual returned the wrong result when comparing integers");
        }