public GiftAidHandlerTests() { _calculator = new Mock <IGiftAidCalculator>(); _calculator.Setup(c => c.CalculateGiftAid(It.IsAny <double>())).Returns(20.0); _repository = new Mock <IGiftAidDeclarationRepository>(); _repository.Setup(r => r.CreateGiftAidDeclaration(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <double>())) .Returns(0); _handler = new GiftAidHandler(_calculator.Object, _repository.Object); }
public GiftAidController(IGiftAidHandler handler) { _handler = handler; }