static async Task ImportIntoCosmosDB(HighContentionScenario scenarioContext) { var container = SetupFixture.Container; var actualSagaId = CosmosSagaIdGenerator.Generate(typeof(HighContentionEndpointWithMigrationMode.HighContentionSaga), nameof(HighContentionEndpointWithMigrationMode.HighContentionSaga.HighContentionSagaData.SomeId), scenarioContext.SomeId); string document = string.Format(MigrationDocument, scenarioContext.MigratedSagaId, actualSagaId, scenarioContext.SomeId); using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(document))) { var response = await container.CreateItemStreamAsync(stream, new PartitionKey(actualSagaId.ToString())); Assert.IsTrue(response.IsSuccessStatusCode, "Successfully imported"); } }
public HighContentionSaga(HighContentionScenario scenario) => this.scenario = scenario;
public DoneHandler(HighContentionScenario scenario) => this.scenario = scenario;