Example #1
0
        public Get()
        {
            var userContext = new Mock <IUserContext>();
            var eventStore  = new Mock <IEventStore <Payment> >();

            eventStore
            .Setup(x => x.Get(It.IsAny <string>(), It.IsAny <Guid>()))
            .ReturnsAsync(() => _events);

            _paymentService = new Service.Services.PaymentService(eventStore.Object, null, userContext.Object, null);
        }
Example #2
0
        public Create()
        {
            var userContext = new Mock <IUserContext>();
            var eventStore  = new Mock <IEventStore <Payment> >();

            _acquiringBankApiClient = new Mock <IAcquiringBankApiClient>();
            _eventDispatcher        = new Mock <IEventDispatcher <Payment> >();
            _paymentService         = new Service.Services.PaymentService(eventStore.Object, _eventDispatcher.Object, userContext.Object, _acquiringBankApiClient.Object);

            eventStore
            .Setup(x => x.Get(It.IsAny <string>(), It.IsAny <Guid>()))
            .ReturnsAsync(() => _events);

            _acquiringBankApiClient
            .Setup(x => x.Post <Guid>(It.IsAny <string>(), It.IsAny <object>()))
            .ReturnsAsync(new Response <Guid>(Guid.Empty));
        }