Example #1
0
        public void OverflowTestMethod()
        {
            DelegateExample _newInstance = new DelegateExample();

            _newInstance.PerformCalculationVar = _newInstance.PerformSumMethod;
            int _result = _newInstance.PerformCalculationVar(int.MaxValue, int.MaxValue);
        }
Example #2
0
        public void SumTestMethod()
        {
            DelegateExample _newInstance = new DelegateExample();

            _newInstance.PerformCalculationVar = _newInstance.PerformSumMethod;
            Assert.AreEqual <int>(_newInstance.PerformSumMethod(0, int.MaxValue), _newInstance.PerformCalculationVar(0, int.MaxValue));
            Assert.AreEqual <int>(_newInstance.PerformSumMethod(int.MinValue, int.MaxValue), _newInstance.PerformCalculationVar(int.MinValue, int.MaxValue));
        }