public void SumTestMethod()
 {
     Lecture.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));
 }
Exemple #2
0
 public void SumTestMethod()
 {
     Lecture.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));
 }
Exemple #3
0
 public void OverflowTestMethod()
 {
     Lecture.DelegateExample _newInstance = new DelegateExample();
     _newInstance.PerformCalculationVar = _newInstance.PerformSumMethod;
     int _result = _newInstance.PerformCalculationVar(int.MaxValue, int.MaxValue);
 }
 public void OverflowTestMethod()
 {
     Lecture.DelegateExample _newInstance = new DelegateExample();
       _newInstance.PerformCalculationVar = _newInstance.PerformSumMethod;
       int _result = _newInstance.PerformCalculationVar(int.MaxValue, int.MaxValue);
 }