public CreateApplicationTests()
        {
            var dbOptions = new DbContextOptionsBuilder <ApplicationDbContext>()
                            .UseInMemoryDatabase(databaseName: "TestDb")
                            .Options;

            applicationDbContext = new ApplicationDbContext(dbOptions);

            createApplicationService = new CreateApplicationService(applicationDbContext, new ApiKeyGenerator());


            var mock = new Mock <ICurrentUserService>();

            mock.Setup(x => x.GetCurrentUserId()).Returns(currentUserId);
            currentUserService = mock.Object;
        }
 public CreateApplicationCommandHandler(ICreateApplicationService createApplicationService, ICurrentUserService currentUserService)
 {
     this.createApplicationService = createApplicationService;
     this.currentUserService       = currentUserService;
 }