public SignInTests(SpirebyteApplicationIntegrationFactory <API.Program> factory)
        {
            var mongoOptions = factory.Services.GetRequiredService <MongoDbOptions>();

            _mongoDbFixture = new MongoDbFixture <UserDocument, Guid>("users", mongoOptions);
            factory.Server.AllowSynchronousIO = true;
            _httpClient      = factory.CreateClient();
            _passwordService = factory.Services.GetRequiredService <IPasswordService>();
        }
Exemple #2
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> > >();
        }
Exemple #3
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> >();
        }
Exemple #4
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>();
        }
Exemple #5
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>();
        }