public DiscountsCommandsTests(MongoDbFixture mongoFixture, RabbitMqFixture rabbitFixture,
                               WebApplicationFactory <Startup> factory)
 {
     _mongoDbFixture  = mongoFixture;
     _rabbitMqFixture = rabbitFixture;
     var client = factory.CreateClient();
 }
 public CategoryCommandsTest(MySqlFixture mySqlFixture, RabbitMqFixture rabbitFixture,
                             WebApplicationFactory <Startup> factory)
 {
     _dbFixture       = mySqlFixture;
     _rabbitMqFixture = rabbitFixture;
     var client = AppConfig.AddConfiguration(factory).CreateClient();
 }
 public ProjectCreatedTests(SpirebyteApplicationFactory <Program> factory)
 {
     _rabbitMqFixture                  = new RabbitMqFixture();
     _projectMongoDbFixture            = new MongoDbFixture <ProjectDocument, string>("projects");
     factory.Server.AllowSynchronousIO = true;
     _eventHandler = factory.Services.GetRequiredService <IEventHandler <ProjectCreated> >();
 }
 public GetSprintTests(SpirebyteApplicationFactory <Program> factory)
 {
     _rabbitMqFixture                  = new RabbitMqFixture();
     _sprintMongoDbFixture             = new MongoDbFixture <SprintDocument, string>("sprints");
     factory.Server.AllowSynchronousIO = true;
     _queryHandler = factory.Services.GetRequiredService <IQueryHandler <GetSprint, SprintDto> >();
 }
 public SignedUpTests(SpirebyteApplicationFactory <Program> factory)
 {
     _rabbitMqFixture     = new RabbitMqFixture();
     _usersMongoDbFixture = new MongoDbFixture <UserDocument, Guid>("users");
     factory.Server.AllowSynchronousIO = true;
     _eventHandler = factory.Services.GetRequiredService <IEventHandler <SignedUp> >();
 }
 public AddGameEventSourceTests(GameApplicationFactory <Startup> factory,
                                MongoDbFixture <GameEventSource, Guid> mongoDbFixture)
 {
     _rabbitMqFixture = new RabbitMqFixture();
     _mongoDbFixture  = mongoDbFixture;
     _mongoDbFixture.CollectionName    = Exchange;
     factory.Server.AllowSynchronousIO = true;
 }
Beispiel #7
0
 public CreateSprintTests(SpirebyteApplicationFactory <Program> factory)
 {
     _rabbitMqFixture                  = new RabbitMqFixture();
     _sprintMongoDbFixture             = new MongoDbFixture <SprintDocument, string>("sprints");
     _projectMongoDbFixture            = new MongoDbFixture <ProjectDocument, string>("projects");
     factory.Server.AllowSynchronousIO = true;
     _commandHandler = factory.Services.GetRequiredService <ICommandHandler <CreateSprint> >();
 }
Beispiel #8
0
 public GetIssuesWithoutSprintForProjectTests(SpirebyteApplicationFactory <Program> factory)
 {
     _rabbitMqFixture                  = new RabbitMqFixture();
     _sprintMongoDbFixture             = new MongoDbFixture <SprintDocument, string>("sprints");
     _projectMongoDbFixture            = new MongoDbFixture <ProjectDocument, string>("projects");
     _issueMongoDbFixture              = new MongoDbFixture <IssueDocument, string>("issues");
     factory.Server.AllowSynchronousIO = true;
     _queryHandler = factory.Services.GetRequiredService <IQueryHandler <GetIssuesWithoutSprintForProject, string[]> >();
 }
Beispiel #9
0
 public GetIssuesTests(SpirebyteApplicationFactory <Program> factory)
 {
     _rabbitMqFixture                  = new RabbitMqFixture();
     _issuesMongoDbFixture             = new MongoDbFixture <IssueDocument, string>("issues");
     _projectsMongoDbFixture           = new MongoDbFixture <ProjectDocument, string>("projects");
     _usersMongoDbFixture              = new MongoDbFixture <UserDocument, Guid>("users");
     factory.Server.AllowSynchronousIO = true;
     _queryHandler = factory.Services.GetRequiredService <IQueryHandler <GetIssues, IEnumerable <IssueDto> > >();
 }
 public UpdateIssueTests(SpirebyteApplicationFactory <Program> factory)
 {
     _rabbitMqFixture                  = new RabbitMqFixture();
     _issuesMongoDbFixture             = new MongoDbFixture <IssueDocument, string>("issues");
     _projectsMongoDbFixture           = new MongoDbFixture <ProjectDocument, string>("projects");
     _usersMongoDbFixture              = new MongoDbFixture <UserDocument, Guid>("users");
     factory.Server.AllowSynchronousIO = true;
     _commandHandler = factory.Services.GetRequiredService <ICommandHandler <UpdateIssue> >();
 }
Beispiel #11
0
        public AddResourceTests()
        {
            _rabbitMqFixture = new RabbitMqFixture("availability");
            _mongoDbFixture  = new MongoDbFixture <ResourceDocument, Guid>("resource-test-db",
                                                                           "Resources");

            var server = new TestServer(Program.GetWebHostBuilder(new string[] {}));

            _httpClient = server.CreateClient();
        }
Beispiel #12
0
 public ToursTests(
     TestDbFixture testDbFixture,
     RabbitMqFixture rabbitMqFixture,
     WebApplicationFactory <TestStartup> factory)
 {
     _testDbFixture   = testDbFixture;
     _rabbitMqFixture = rabbitMqFixture;
     _client          = factory.WithWebHostBuilder(builder => builder.UseStartup <TestStartup>())
                        .CreateClient();
 }
Beispiel #13
0
        public UpdateUserTests(SpirebyteApplicationIntegrationFactory <Program> factory)
        {
            var rabbitmqOptions = factory.Services.GetRequiredService <RabbitMqOptions>();

            _rabbitMqFixture = new RabbitMqFixture(rabbitmqOptions);
            var mongoOptions = factory.Services.GetRequiredService <MongoDbOptions>();

            _mongoDbFixture = new MongoDbFixture <UserDocument, Guid>("users", mongoOptions);
            factory.Server.AllowSynchronousIO = true;
            _commandHandler = factory.Services.GetRequiredService <ICommandHandler <UpdateUser> >();
        }
Beispiel #14
0
        public DataProtectorTokenProviderTests(SpirebyteApplicationIntegrationFactory <Program> factory)
        {
            var rabbitmqOptions = factory.Services.GetRequiredService <RabbitMqOptions>();

            _rabbitMqFixture = new RabbitMqFixture(rabbitmqOptions);
            var mongoOptions = factory.Services.GetRequiredService <MongoDbOptions>();

            _mongoDbFixture = new MongoDbFixture <UserDocument, Guid>("users", mongoOptions);
            factory.Server.AllowSynchronousIO = true;
            _dataProtectorTokenProvider       = factory.Services.GetRequiredService <IDataProtectorTokenProvider>();
        }
Beispiel #15
0
        public GetUsersTests(SpirebyteApplicationIntegrationFactory <Program> factory)
        {
            var rabbitmqOptions = factory.Services.GetRequiredService <RabbitMqOptions>();

            _rabbitMqFixture = new RabbitMqFixture(rabbitmqOptions);
            var mongoOptions = factory.Services.GetRequiredService <MongoDbOptions>();

            _mongoDbFixture = new MongoDbFixture <UserDocument, Guid>("users", mongoOptions);
            factory.Server.AllowSynchronousIO = true;
            _queryHandler = factory.Services.GetRequiredService <IQueryHandler <GetUsers, IEnumerable <UserDto> > >();
        }
 public LeaguesIntegrationTests(
     TestDbFixture testDbFixture,
     RabbitMqFixture rabbitMqFixture,
     WebApplicationFactory <TestStartup> factory)
 {
     _testDbFixture   = testDbFixture;
     _rabbitMqFixture = rabbitMqFixture;
     _client          = factory.WithWebHostBuilder(builder => builder.UseStartup <TestStartup>())
                        .CreateClient();
     _mapper = new Mapper(new MapperConfiguration(cfg => { cfg.AddProfile <LeaguesProfile>(); }));
 }
Beispiel #17
0
        public SignInTests(SpirebyteApplicationIntegrationFactory <Program> factory)
        {
            var rabbitmqOptions = factory.Services.GetRequiredService <RabbitMqOptions>();

            _rabbitMqFixture = new RabbitMqFixture(rabbitmqOptions);
            var mongoOptions = factory.Services.GetRequiredService <MongoDbOptions>();

            _mongoDbFixture = new MongoDbFixture <UserDocument, Guid>("users", mongoOptions);
            factory.Server.AllowSynchronousIO = true;
            _requestHandler  = factory.Services.GetRequiredService <IRequestHandler <SignIn, AuthDto> >();
            _passwordService = factory.Services.GetRequiredService <IPasswordService>();
        }
 public UserInvitedToProjectTests(SpirebyteApplicationFactory <Program> factory)
 {
     _rabbitMqFixture = new RabbitMqFixture();
     factory.Server.AllowSynchronousIO = true;
     _eventHandler = factory.Services.GetRequiredService <IEventHandler <UserInvitedToProject> >();
 }
Beispiel #19
0
 public PasswordForgottenTests(SpirebyteApplicationFactory <Program> factory)
 {
     _rabbitMqFixture = new RabbitMqFixture();
     factory.Server.AllowSynchronousIO = true;
     _eventHandler = factory.Services.GetRequiredService <IEventHandler <PasswordForgotten> >();
 }
 public AddResourceTests(PaccoApplicationFactory <Program> factory)
 {
     _rabbitMqFixture = new RabbitMqFixture();
     _mongoDbFixture  = new MongoDbFixture <ResourceDocument, Guid>("resources");
     factory.Server.AllowSynchronousIO = true;
 }
Beispiel #21
0
 public CreateCategoryCommandTest(MongoDbFixture mongoDbFixture, RabbitMqFixture rabbitMqFixture)
 {
     _mongoDbFixture  = mongoDbFixture;
     _rabbitMqFixture = rabbitMqFixture;
 }