public SagaTestHarness(BusTestHarness testHarness, ISagaRepository <TSaga> repository) { _repository = repository; _querySagaRepository = _repository as IQuerySagaRepository <TSaga>; _testTimeout = testHarness.TestTimeout; _consumed = new ReceivedMessageList(testHarness.TestTimeout); _created = new SagaList <TSaga>(testHarness.TestTimeout); _sagas = new SagaList <TSaga>(testHarness.TestTimeout); TestRepository = new TestSagaRepositoryDecorator <TSaga>(_repository, _consumed, _created, _sagas); testHarness.OnConfigureReceiveEndpoint += ConfigureReceiveEndpoint; }
public SagaTestHarness(BusTestHarness testHarness, ISagaRepository <TSaga> repository, string queueName) : base(repository, testHarness.TestTimeout) { _consumed = new ReceivedMessageList(testHarness.TestTimeout, testHarness.InactivityToken); _created = new SagaList <TSaga>(testHarness.TestTimeout, testHarness.InactivityToken); _sagas = new SagaList <TSaga>(testHarness.TestTimeout, testHarness.InactivityToken); TestRepository = new TestSagaRepositoryDecorator <TSaga>(repository, _consumed, _created, _sagas); if (string.IsNullOrWhiteSpace(queueName)) { testHarness.OnConfigureReceiveEndpoint += ConfigureReceiveEndpoint; } else { testHarness.OnConfigureBus += configurator => ConfigureNamedReceiveEndpoint(configurator, queueName); } }
public SagaTestHarness(BusTestHarness testHarness, ISagaRepository <TSaga> repository, string queueName) { _repository = repository; _querySagaRepository = _repository as IQuerySagaRepository <TSaga>; _testTimeout = testHarness.TestTimeout; _consumed = new ReceivedMessageList(testHarness.TestTimeout); _created = new SagaList <TSaga>(testHarness.TestTimeout); _sagas = new SagaList <TSaga>(testHarness.TestTimeout); TestRepository = new TestSagaRepositoryDecorator <TSaga>(_repository, _consumed, _created, _sagas); if (string.IsNullOrWhiteSpace(queueName)) { testHarness.OnConfigureReceiveEndpoint += ConfigureReceiveEndpoint; } else { testHarness.OnConfigureBus += configurator => ConfigureNamedReceiveEndpoint(configurator, queueName); } }