public MeetupCommandHandlerTestsFixture() { var mockMediator = new Mock <IMediator>(); mockMediator.Setup((x) => x.Publish <INotification>(It.IsAny <MeetupAnnouncedDomainEvent>(), default(CancellationToken))) .Returns <MeetupAnnouncedDomainEvent, CancellationToken>((x, y) => { IsVerifiedMeetupAnnouncedDomainEventHandler = true; return(Task.CompletedTask); }); var options = new DbContextOptionsBuilder <MeetupDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; dbContext = new MeetupDbContext(options, mockMediator.Object); }
public MeetupController(MeetupDbContext dbContext) { _dbContext = dbContext; }
public MeetupRepository(MeetupDbContext dbContext) { _dbContext = dbContext; }