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