public CalculatorManagerTestsAlternate() { _mathRepository = Substitute.For <IMathRepository>(); _mathRepository.GetIntMax().Returns(Int32.MaxValue); _mathRepository.GetIntMin().Returns(Int32.MinValue); _calculatorManager = new CalculatorManager(_mathRepository); }
public int SubtractFromMaxInt(int number) { //numeric owerflow durumnda exception patlatmak için int result; checked { result = _mathRepositories.GetIntMax() - number; } return(result); }