<commit_before>﻿namespace NServiceBus.AcceptanceTests.Sagas
{
    using System;
    using EndpointTemplates;
    using AcceptanceTesting;

    using NServiceBus.MongoDB;

    using NUnit.Framework;
    using Saga;
    using ScenarioDescriptors;

    public class When_receiving_that_should_start_a_saga : NServiceBusAcceptanceTest
    {
        [Test, Ignore]
        public void Should_start_the_saga_and_call_messagehandlers()
        {
            Scenario.Define<SagaEndpointContext>()
                    .WithEndpoint<SagaEndpoint>(b => b.Given(bus => bus.SendLocal(new StartSagaMessage() { SomeId = Guid.NewGuid().ToString() })))
                    .Done(context => context.InterceptingHandlerCalled && context.SagaStarted)
                    .Repeat(r => r.For(Transports.Default))
                    .Should(c =>
                    {
                        Assert.True(c.InterceptingHandlerCalled, "The message handler should be called");
                        Assert.True(c.SagaStarted, "The saga should have been started");
                    })
                    .Run();
        }


        [Test]
        public void Should_not_start_saga_if_a_interception_handler_has_been_invoked()
        {
            Scenario.Define(() => new SagaEndpointContext { InterceptSaga = true })<commit_msg>reformatted line<commit_after>﻿namespace NServiceBus.AcceptanceTests.Sagas
{
    using System;
    using EndpointTemplates;
    using AcceptanceTesting;

    using NServiceBus.MongoDB;

    using NUnit.Framework;
    using Saga;
    using ScenarioDescriptors;

    public class When_receiving_that_should_start_a_saga : NServiceBusAcceptanceTest
    {
        [Test, Ignore]
        public void Should_start_the_saga_and_call_messagehandlers()
        {
            Scenario.Define<SagaEndpointContext>()
                .WithEndpoint<SagaEndpoint>(
                    b => b.Given(bus => bus.SendLocal(new StartSagaMessage() { SomeId = Guid.NewGuid().ToString() })))
                .Done(context => context.InterceptingHandlerCalled && context.SagaStarted)
                .Repeat(r => r.For(Transports.Default))
                .Should(
                    c =>
                        {
                            Assert.True(c.InterceptingHandlerCalled, "The message handler should be called");
                            Assert.True(c.SagaStarted, "The saga should have been started");
                        }).Run();
        }


        [Test]
        public void Should_not_start_saga_if_a_interception_handler_has_been_invoked()
        {
            Scenario.Define(() => new SagaEndpointContext { InterceptSaga = true })
{'fraction_non_alphanumeric': 0.08761329305135952, 'fraction_numerical': 0.0, 'mean_word_length': 2.1128084606345476, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7065826', 'n_tokens_mistral': 752, 'n_tokens_neox': 716, 'n_words': 127}