public void CalcAValue_ThrowsDivideByZeroException()
        {
            //System.Diagnostics.Debugger.Launch();

            // arrange
            var mock = new Mock<ICalcEngine>();
            mock.Setup(x => x.Calc(It.IsAny<int>())).Throws<DivideByZeroException>();

            var controller = new CalcController(mock.Object);

            // act and assert
            Assert.Throws<DivideByZeroException>(() => { controller.CalcAValue(int.MinValue); });
        }
        public void CalcAValue_ReturnsOkNegotiatedContentResult()
        {
            //System.Diagnostics.Debugger.Launch();

            // arrange
            var mock = new Mock<ICalcEngine>();
            mock.Setup(x => x.Calc(It.IsInRange<int>(1, int.MaxValue, Range.Inclusive))).Returns<int>(v => 10 % v);

            var controller = new CalcController(mock.Object);

            // act
            IHttpActionResult actionResult = controller.CalcAValue(10);

            //  assert
            Assert.IsType<OkNegotiatedContentResult<int>>(actionResult);
        }