示例#1
0
 static void Main(string[] args)
 {
     var customMath = new CustomMath();
     var algorithm = new Algorithm();
     double r = algorithm.Run(customMath, 10, 20, 100);
     Console.WriteLine("r={0}", r);
 }
 public void Calc_NegativeXY_AlgorithmNegativeCalcException()
 {
     const double x = 10;
     const double y = 20;
     const double z = 30;
     var mock = new Mock<CustomMath>();
     mock.Setup(foo => foo.Calc(It.IsAny<double>(), It.IsAny<double>())).Returns(-1);
     var algorithm = new Algorithm();
     algorithm.Run(mock.Object, x, y, z);
 }