Пример #1
0
        public CreateCardCommandHandlerTests()
        {
            eventBusMock       = new Mock <IEventBus>();
            cardRepositoryMock = new Mock <ICardWriteOnlyRepository>();
            cardRepositoryMock.Setup(x => x.Add(It.IsAny <Card>()))
            .ReturnsAsync(true);

            sut = new CreateCardCommandHandler(eventBusMock.Object, cardRepositoryMock.Object, new Ametista.Core.ValidationNotificationHandler());
        }
Пример #2
0
        public CreateCardCommandHandlerTests()
        {
            eventBusMock       = new Mock <IEventBus>();
            cardRepositoryMock = new Mock <ICardWriteOnlyRepository>();
            cardRepositoryMock.Setup(x => x.Add(It.IsAny <Card>()))
            .ReturnsAsync(true);

            handler = new CreateCardCommandHandler(eventBusMock.Object, cardRepositoryMock.Object);
        }