Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public GiftAidController(IGiftAidHandler handler)
 {
     _handler = handler;
 }